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

Change DoDs to be spans instead of links #3815

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Change DoDs to be spans instead of links #3815

merged 3 commits into from
Jul 30, 2024

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Jul 26, 2024

They don't link to anything and should not be rendered as links in HTML for cases like an Atom feed. See Slack discussion.

@rakyi rakyi requested a review from marcelgerber July 26, 2024 07:53
@rakyi rakyi changed the title Chang DoDs to be spans instead of links Change DoDs to be spans instead of links Jul 26, 2024
@@ -242,13 +242,4 @@ $zindex-controls-drawer: 150;
.markdown-text-wrap__line:last-child {
margin-bottom: 2px;
}

a.dod-span {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We no longer need to override the styles for links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As Marcel pointed out, we still need to add the styles to Grapher. Added a mixin for this.

@owidbot
Copy link
Contributor

owidbot commented Jul 26, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-dod-span

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-07-26 08:04:43 UTC
Execution time: 1.17 seconds

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Hi! For whatever reason, neither the styles nor the event handler applies in admin.
See this chart, for example, where "newborns" in the subtitle should be DoD-ified.

@marcelgerber
Copy link
Member

Ah, right: It's probably enough to make sure the DoD styles are explicitly included in admin.
Just noticed the .dod-span span { pointer-events: none } rule, that should just about do it :)

rakyi added 2 commits July 30, 2024 15:23
They don't link to anything and should not be rendered as links in HTML
for cases like an Atom feed.
@rakyi
Copy link
Contributor Author

rakyi commented Jul 30, 2024

Did it with a mixin. Is that a sensible approach?

@rakyi rakyi requested a review from marcelgerber July 30, 2024 13:55
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Yes that's great.

packages/@ourworldindata/components/src/styles/mixins.scss Outdated Show resolved Hide resolved
@rakyi rakyi merged commit bfd1b37 into master Jul 30, 2024
20 checks passed
@rakyi rakyi deleted the dod-span branch July 30, 2024 14:19
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.

3 participants