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

[58734] Extract work package info line into a Primer component and document it #17234

Conversation

bsatarnejad
Copy link
Contributor

@bsatarnejad bsatarnejad commented Nov 20, 2024

Ticket

https://community.openproject.org/projects/openproject/work_packages/58734/activity

What are you trying to accomplish?

Make a separate component that shows type, ID and status of a WP in one line. Therefore, this component can be used in different places like meeting agenda item, hover card, ...

Screenshots

Before:
Screenshot 2024-11-20 at 12 34 37

After:
Screenshot 2024-11-20 at 12 25 58

Merge checklist

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

Copy link
Contributor

@HDinger HDinger left a comment

Choose a reason for hiding this comment

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

Could you please rebase that on #16989 and update the usages so that we see it in use?

app/components/work_packages/info_line_component.rb Outdated Show resolved Hide resolved
@bsatarnejad
Copy link
Contributor Author

Could you please rebase that on #16989 and update the usages so that we see it in use?

Yes sure, I'll do that 👍

@bsatarnejad bsatarnejad changed the base branch from dev to implementation/58345-re-design-relations-tab-according-to-figma-mockups November 20, 2024 13:45
@bsatarnejad bsatarnejad changed the base branch from implementation/58345-re-design-relations-tab-according-to-figma-mockups to dev November 20, 2024 13:46
@bsatarnejad bsatarnejad force-pushed the 58734-extract-work-package-info-line-into-a-primer-component-and-document-it branch 2 times, most recently from 5dceab8 to b0f754e Compare November 20, 2024 14:05
@bsatarnejad bsatarnejad changed the base branch from dev to implementation/58345-re-design-relations-tab-according-to-figma-mockups November 20, 2024 14:06
@bsatarnejad bsatarnejad force-pushed the 58734-extract-work-package-info-line-into-a-primer-component-and-document-it branch 2 times, most recently from b95270e to c5affce Compare November 21, 2024 11:06
Copy link
Contributor

@HDinger HDinger left a comment

Choose a reason for hiding this comment

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

Hi @bsatarnejad
I have some smaller wishes for improvement for the component. Further, please also update the other occurences of the InfoLine that we are already aware of, in this PR (meetings, hovercard, ...)

Comment on lines 3 to 17
flex.with_column(mr: 2) do
render(WorkPackages::HighlightedTypeComponent.new(work_package: @work_package, font_size: :small))
end
flex.with_column(mr: 2) do
render(Primer::Beta::Text.new(font_size: :small, color: :muted)) { "##{@work_package.id}" }
end
flex.with_column do
render WorkPackages::StatusBadgeComponent.new(status: @work_package.status)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, the font-size is always set to small and the ID always muted. I guess, it makes sense to make at least the font_size configurable. The default could still be small.

@bsatarnejad bsatarnejad force-pushed the 58734-extract-work-package-info-line-into-a-primer-component-and-document-it branch from 2f0c893 to ad8f439 Compare November 22, 2024 07:04
Copy link
Contributor

@HDinger HDinger left a comment

Choose a reason for hiding this comment

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

Nice 👍 🌟

@bsatarnejad bsatarnejad merged commit 8f3bfe7 into implementation/58345-re-design-relations-tab-according-to-figma-mockups Nov 22, 2024
5 of 6 checks passed
@bsatarnejad bsatarnejad deleted the 58734-extract-work-package-info-line-into-a-primer-component-and-document-it branch November 22, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants