Skip to content

Conversation

@mnocon
Copy link
Contributor

@mnocon mnocon commented Jul 9, 2024

This PR builds upon #2394

Target: master, 4.6

When compiling the changelog I've noticed that while the New pill is great it's not so easy to notice when it's hidden deep in the tree. If you go to https://doc.ibexa.co/en/latest/ it's hard to find that we've added a page for the ContentName criterion. You also don't learn that Ibexa Engage is new unless you decide to expand this section.

This PR propagates the "New" pill to higher nodes - if there is a child node with a "New" label the parent node will display "New" as well.

Preview: https://ez-systems-developer-documentation--2429.com.readthedocs.build/en/2429/

I'm finding the visible pills -> then finding their parents in the DOM -> then finding the closest pill to each parent -> making them visible

My JS skills are very basic, maybe there's a better way to do this - all suggestions are welcome.

@mnocon mnocon changed the title Mark higher-level nodes with "New pill", not only the actual item Mark higher-level nodes with "New" pill as well, not only the actual item Jul 9, 2024
@mnocon mnocon force-pushed the propagate-new-pill branch from 1664190 to ba1393b Compare July 9, 2024 14:21
@mnocon mnocon marked this pull request as ready for review July 9, 2024 14:36
@mnocon mnocon requested review from a team and GrabowskiM July 9, 2024 14:37
@mnocon mnocon force-pushed the propagate-new-pill branch from ba1393b to 342b8dc Compare July 9, 2024 17:27
@mnocon mnocon requested a review from adriendupuis July 10, 2024 05:56
Co-authored-by: Dariusz Szut <dew326@gmail.com>
Copy link
Contributor

@adriendupuis adriendupuis left a comment

Choose a reason for hiding this comment

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

A protection against duplicate seems useless but no performance issue if kept.
Nice trick to have the pill hidden on every node and reveal the one from new leafs' ancestors.

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
@mnocon mnocon merged commit 51c20cb into master Jul 15, 2024
@mnocon mnocon deleted the propagate-new-pill branch July 15, 2024 08:21
mnocon added a commit that referenced this pull request Jul 15, 2024
…item (#2429)

* Mark higher-level nodes with "New pill", not only the actual item

* Before review

* Update docs/js/custom.js

Co-authored-by: Dariusz Szut <dew326@gmail.com>

* Applied review suggestion

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>

---------

Co-authored-by: Dariusz Szut <dew326@gmail.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants