Skip to content

[#74683] Simplify story point metric#23061

Merged
myabc merged 4 commits into
devfrom
implementation/74683-remove-story_points-responsive-behavior
May 5, 2026
Merged

[#74683] Simplify story point metric#23061
myabc merged 4 commits into
devfrom
implementation/74683-remove-story_points-responsive-behavior

Conversation

@myabc
Copy link
Copy Markdown
Contributor

@myabc myabc commented May 5, 2026

Note

This PR is based off #22936

Ticket

https://community.openproject.org/wp/74683

What are you trying to accomplish?

Remove the Backlogs-specific responsive story-points behavior from the generic work package card styles. Backlogs cards now show only the numeric story point metric visually, while assistive technology still receives the full localized story point label.

Screenshots

Before After
image Screenshot 2026-05-05 at 12 15 00

What approach did you choose and why?

The generic WorkPackageCardComponent should not depend on the Backlogs page container, so the container-query override was removed from its Sass. The Backlogs story-points component now owns the accessibility behavior by rendering the numeric value as aria-hidden and adding a screen-reader-only backlogs.story_points label.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@myabc myabc changed the base branch from dev to code-maintenance/74088-backlog-sprints-component-renaming May 5, 2026 10:39
@myabc myabc changed the title Refine Backlogs card metric accessibility [#74683Refine Backlogs card metric accessibility May 5, 2026
@myabc myabc changed the title [#74683Refine Backlogs card metric accessibility [#74683] Refine Backlogs card metric accessibility May 5, 2026
@myabc myabc force-pushed the implementation/74683-remove-story_points-responsive-behavior branch from 5de5889 to b0bf56e Compare May 5, 2026 10:40
@myabc myabc changed the title [#74683] Refine Backlogs card metric accessibility [#74683] Simplify story point metric May 5, 2026
@myabc myabc force-pushed the implementation/74683-remove-story_points-responsive-behavior branch 2 times, most recently from 991d8c6 to 048ded1 Compare May 5, 2026 11:31
@myabc myabc requested review from HDinger May 5, 2026 11:34
@myabc myabc requested review from dombesz May 5, 2026 11:35
@EinLama EinLama self-requested a review May 5, 2026 11:42
@myabc myabc marked this pull request as ready for review May 5, 2026 11:51
Copilot AI review requested due to automatic review settings May 5, 2026 11:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Backlogs-specific responsive story-point behavior from the generic OpenProject::Common::WorkPackageCardComponent styling, and moves the story point accessibility behavior into the Backlogs-specific StoryPointsComponent. Visually, Backlogs cards now show only the numeric story point value, while screen readers receive the full localized “N story points” label.

Changes:

  • Updated Backlogs::StoryPointsComponent to render a visually-visible number (aria-hidden) plus a screen-reader-only localized label.
  • Simplified the common work package card metric layout CSS by dropping the Backlogs container-query override and tightening metric column sizing/alignment.
  • Adjusted Backlogs component specs to assert the new accessibility-oriented markup instead of "N points" text.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
modules/backlogs/app/components/backlogs/story_points_component.html.erb Renders numeric story points visually and provides SR-only localized label.
app/components/open_project/common/work_package_card_component.sass Removes Backlogs container-query overrides; adjusts metric column sizing and alignment.
app/components/open_project/common/work_package_card_component.rb Removes card_classes helper in favor of template-driven class handling.
app/components/open_project/common/work_package_card_component.html.erb Applies conditional metric class via grid_layout call instead of card_classes.
modules/backlogs/spec/components/backlogs/story_points_component_spec.rb Updates specs to verify visible number and SR-only label output.
modules/backlogs/spec/components/backlogs/work_package_card_component_spec.rb Updates card metric expectations to match new story points markup.
modules/backlogs/spec/components/backlogs/work_package_card_box_item_component_spec.rb Updates metric forwarding expectations for Backlogs card items.
modules/backlogs/spec/components/backlogs/sprint_component_spec.rb Updates story point assertions across sprint-rendered cards.
modules/backlogs/spec/components/backlogs/inbox_component_spec.rb Updates story point assertions across inbox-rendered cards.
modules/backlogs/spec/components/backlogs/bucket_component_spec.rb Updates story point assertions for bucket-rendered cards.

Base automatically changed from code-maintenance/74088-backlog-sprints-component-renaming to dev May 5, 2026 13:14
Copy link
Copy Markdown
Contributor

@EinLama EinLama left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

myabc added 4 commits May 5, 2026 15:17
Makes `WorkPackageCardComponent` apply correct classes to grid areas.
Render story point card metrics as numeric-only text while keeping the
full localized story point label available to assistive technology.

Remove the Backlogs-specific container query from the generic work
package card styles and cover the accessible metric behavior in
component specs.

https://community.openproject.org/wp/74683
@myabc myabc force-pushed the implementation/74683-remove-story_points-responsive-behavior branch from 048ded1 to 50e7a24 Compare May 5, 2026 14:17
@myabc myabc merged commit 50796cc into dev May 5, 2026
17 of 18 checks passed
@myabc myabc deleted the implementation/74683-remove-story_points-responsive-behavior branch May 5, 2026 17:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

4 participants