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

XWIKI-22138: Tips panel does not have underline style for links in subwiki #3094

Merged
merged 2 commits into from
May 23, 2024

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Apr 29, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-22138

Changes

Description

  • Replaced the classic CSS class selector with a class contains selector

Clarifications

  • The subwiki add their IDs before all of the panel specific classes. There's no other robust way to select the Tips Panel than using this class. In order to still use it, I decided to go for an attribute selector based on class. This allows to use a contains boolean that would not be possible to do with the . notation.
  • In the new class selector, I added a space after the HelpTipsPanel. This makes sure we don't match any panel in a wiki that would have HelpTipsPanel for ID. I think the selector as it is now is robust enough. It's not perfect and could still be matched unexpectedly in some very niche situations e.g., using a panel with an ID which contains the string HelpTipsPanel.

Screenshots & Video

Before the changes proposed in this PR
image
After the changes proposed in this PR
image

Executed Tests

Style changes only, tested manually on a local distribution with:

  • the main wiki
  • two subwikis

See the screenshots above. After updating the color theme (reloading the LESS content from the updated general.less), we could witness that the anchors are properly hit by the new css selector.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • None

…bwiki

* Replaced the standard CSS class selector with a `class contains` selector
@surli surli merged commit e3e57ef into xwiki:master May 23, 2024
2 checks passed
github-actions bot pushed a commit that referenced this pull request May 23, 2024
…bwiki (#3094)

* Replaced the standard CSS class selector with a `class contains` selector

(cherry picked from commit e3e57ef)
surli pushed a commit that referenced this pull request May 23, 2024
…bwiki (#3094)

* Replaced the standard CSS class selector with a `class contains` selector

(cherry picked from commit e3e57ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants