Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTL-1707 Dokka: adjust code area to new design #4051

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nikpachoo
Copy link
Contributor

@nikpachoo nikpachoo commented Mar 4, 2025

This PR has changes for adjust the code block and the tooltip for copy of code and links:
KTL-1698 Dokka: adjust inline code block
KTL-1704 Dokka: adjust tooltip style

Here's how it looks like.

  1. Code blocks
    https://github.com/user-attachments/assets/ed720b20-ae33-486f-8bbf-3c206428fbb1

  2. Links tooltips
    https://github.com/user-attachments/assets/95b55a86-c7c7-4c60-9766-f3c56dda6c51

@nikpachoo nikpachoo force-pushed the ktl-1707-adjust-code-area branch 3 times, most recently from 1664937 to 452ece7 Compare March 5, 2025 14:20
@nikpachoo nikpachoo marked this pull request as draft March 5, 2025 16:43
@nikpachoo nikpachoo force-pushed the ktl-1707-adjust-code-area branch from 452ece7 to 8e46fde Compare March 19, 2025 21:51
@nikpachoo nikpachoo force-pushed the ktl-1707-adjust-code-area branch from c451df2 to 8f29739 Compare March 19, 2025 22:26
@nikpachoo nikpachoo marked this pull request as ready for review March 19, 2025 22:27
padding: 7px var(--size-s3) 7px var(--size-s2);
border-radius: var(--size-s1);
border: 1px solid var(--color-w16);
background: var(--color-background-page-dt);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check if the background color value for tooltip matches the spec?
Left one is from the figma and right one is the actual one
Screenshot 2025-03-21 at 19 10 33

cursor: pointer;

&:hover {
background: var(--color-w50);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a certain style when this button is tapped on mobile according to design
https://www.figma.com/design/p5V2MV7znMxdVekniseQkA?node-id=22-7008#750370863

position: relative;
padding: 12px 16px;
border-radius: var(--size-s1);
background-color: var(--color-background-code-block);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this value is correct but for some reason the background of a code block on dark theme differs from design.
The left one is an actual code and the right one is the design from figma.
Probably the background color of the page differs and influences the code block style
Screenshot 2025-03-21 at 19 26 59

*/
.symbol:not(.token, .wrapped), code.block {
display: block;
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some stylelint warnings here that would be good to apply, most of them are regarding the property order and could be autofixed

const POPUP_TIMEOUT = 1200;

document.addEventListener('click', function (event) {
if (!(event.target instanceof Element)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this check? it might be always true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants