Skip to content

Replace the unicode toggle with Redmine's sprite icon - #45

Merged
mboremski merged 2 commits into
xmera-circle:developfrom
mboremski:feature/change-toggle
Aug 27, 2026
Merged

Replace the unicode toggle with Redmine's sprite icon#45
mboremski merged 2 commits into
xmera-circle:developfrom
mboremski:feature/change-toggle

Conversation

@mboremski

Copy link
Copy Markdown
Collaborator

Fixes #3

The trigger used the unicode characters U+25B6 / U+25BC, which render differently across browsers and platforms and do not follow the theme. Redmine 6 ships an icon sprite; 'angle-right' is the shape the core uses for the same purpose.

The icon is now rendered once in the partial and the state is expressed purely by the existing css class: .trigger.opened svg is rotated by 90 degrees. JavaScript no longer rewrites the element's content, so the class is the single source of truth.

That also fixes a latent inconsistency: when a level was collapsed, the nested triggers below it had their glyph replaced but kept the opened class. They now get closed like the element the user actually clicked, so a subsequent click on them behaves as expected instead of collapsing something that already looks collapsed.

slides.js shrinks by four lines and no longer knows about presentation.

Thank you very much for your contribution! We highly appreciate that.

Please compare your branch with the develop branch of this repository.

Fixes xmera-circle#3

The trigger used the unicode characters U+25B6 / U+25BC, which render
differently across browsers and platforms and do not follow the theme.
Redmine 6 ships an icon sprite; 'angle-right' is the shape the core uses
for the same purpose.

The icon is now rendered once in the partial and the state is expressed
purely by the existing css class: `.trigger.opened svg` is rotated by 90
degrees. JavaScript no longer rewrites the element's content, so the
class is the single source of truth.

That also fixes a latent inconsistency: when a level was collapsed, the
nested triggers below it had their glyph replaced but kept the `opened`
class. They now get `closed` like the element the user actually clicked,
so a subsequent click on them behaves as expected instead of collapsing
something that already looks collapsed.

`slides.js` shrinks by four lines and no longer knows about presentation.
@mboremski mboremski self-assigned this Aug 27, 2026
@mboremski
mboremski merged commit 2ecc046 into xmera-circle:develop Aug 27, 2026
3 checks passed
@mboremski
mboremski deleted the feature/change-toggle branch August 27, 2026 09:14
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.

1 participant