Skip to content

Conversation

@Mary-Clb
Copy link
Contributor

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

It fixes !41065

The issue was initially reported for project notes.
However, the fix has been implemented at the Notepad class level by adding a toggle button, allowing notes to be collapsed and expanded across all components that use notes.

Capture d’écran du 2025-12-18 11-52-22 Capture d’écran du 2025-12-18 11-52-29

@Mary-Clb Mary-Clb self-assigned this Dec 18, 2025
} %}

<div class="firstbloc">
<div class="firstbloc d-flex gap-2">
Copy link
Contributor

Choose a reason for hiding this comment

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

This will certainly cause an issue with changes from #22404

@Mary-Clb
Copy link
Contributor Author

@stonebuzz as we discussed in the meeting :

Capture d’écran du 2025-12-29 11-53-46 Capture d’écran du 2025-12-29 11-53-56

@stonebuzz
Copy link
Contributor

@Mary-Clb, would it be possible to add an icon (e.g. eyes-off / eyes-on or collapse-*) to the link, and potentially shorten the text to “Show all / Collapse all”?

@cedric-anne cedric-anne added this to the 11.0.5 milestone Jan 5, 2026
@stonebuzz
Copy link
Contributor

One last point:

When clicking on a single note, its opening behavior differs from using the "View All" button.

Manually, opening a note takes about one second, whereas opening it via the link is instantaneous.

Ideally, bulk opening should occur at the same speed as opening notes manually.

js/common.js Outdated
*
* @param {Element} element - The element that was clicked (button or link)
*/
window.toggleNotesAccordion = function(element) {
Copy link
Contributor

Choose a reason for hiding this comment

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

While inline script blocks are not ideal, keeping this code in the notepad form template will make it easier to know it is only used for the notepad form when JS gets reorganized into "components" or modules in the future.

@Rom1-B
Copy link
Contributor

Rom1-B commented Jan 6, 2026

Please rebase to solve conflicts

@Mary-Clb Mary-Clb force-pushed the enhancement/notes-display-on-project-view branch from 2104b1c to 3be0127 Compare January 7, 2026 14:36
data-expand-title="{{ __('Show all') }}"
data-collapse-title="{{ __('Expand all') }}">
<i class="ti ti-eye-off"></i>
<span>{{ __('Show all') }}</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.

@cedric-anne
I'm having trouble with the translations for the expand/collapse functionality:

  • When I use "collapse all", it remains in English
  • When I use "show all", it translates to "voir tous" instead of the expected "voir tout"

Could you help clarify which translation keys I should use ?

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.

6 participants