Content
View differences
Updated by Parimal Satyal 9 months ago
### Problem statement
We have a number of occurences of "grey boxes" around the primerized part of the application, that were all handcrafted, but followed the same recipe. Since we want to ensure consistent looks around the application, a common component should be extracted for these components, including usage instructions.
Occurences look like this mostly:
```ruby
Primer::Box.new(border: true, border_radius: 2, bg: :inset, p: 3)
```
### Acceptance criteria
* Extract common component for these "inset" elements (e.g. named `InsetBox`)
* Component component has opinionated defaults according to current implementation
* Allows implementation, but allows to overwrite:
* Border: true/false _**to be defined**_
* Component is properly documented in Lookbook
### Occurences
* [Projects::CopyFormComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/copy_form_component.html.erb#L35-L37) (exactly the same)
* [Projects::NewComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/new_component.html.erb) (exactly the same)
* [Projects::SourceProjectSelectComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/source_project_select_component.html.erb) (exactly the same)
* [Projects::TemplateSelectComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/template_select_component.html.erb) (exactly the same)
* [ProjectQueries::PublicFlagComponent](https://github.com/opf/openproject/blob/dev/app/components/shares/project_queries/public_flag_component.html.erb) (exactly the same)
* [MeetingAgendaItems::Outcomes::ShowNotesComponent](https://github.com/opf/openproject/blob/dev/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb) (not exactly the same style, but pretty close)
* different padding at the bottom
* background color added via CSS (and might be a different shade of grey, `inset` vs. `muted`)
* [WorkPackageMeetingsTab::MeetingAgendaItemComponent](https://github.com/opf/openproject/blob/dev/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb) (not exactly the same style)
* background color added via CSS (and might be a different shade of grey, `inset` vs. `muted`)
We have a number of occurences of "grey boxes" around the primerized part of the application, that were all handcrafted, but followed the same recipe. Since we want to ensure consistent looks around the application, a common component should be extracted for these components, including usage instructions.
Occurences look like this mostly:
```ruby
Primer::Box.new(border: true, border_radius: 2, bg: :inset, p: 3)
```
### Acceptance criteria
* Extract common component for these "inset" elements (e.g. named `InsetBox`)
* Component
* Allows
* Border: true/false
* Component is properly documented in Lookbook
### Occurences
* [Projects::CopyFormComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/copy_form_component.html.erb#L35-L37) (exactly the same)
* [Projects::NewComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/new_component.html.erb) (exactly the same)
* [Projects::SourceProjectSelectComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/source_project_select_component.html.erb) (exactly the same)
* [Projects::TemplateSelectComponent](https://github.com/opf/openproject/blob/dev/app/components/projects/template_select_component.html.erb) (exactly the same)
* [ProjectQueries::PublicFlagComponent](https://github.com/opf/openproject/blob/dev/app/components/shares/project_queries/public_flag_component.html.erb) (exactly the same)
* [MeetingAgendaItems::Outcomes::ShowNotesComponent](https://github.com/opf/openproject/blob/dev/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb) (not exactly the same style, but pretty close)
* different padding at the bottom
* background color added via CSS (and might be a different shade of grey, `inset` vs. `muted`)
* [WorkPackageMeetingsTab::MeetingAgendaItemComponent](https://github.com/opf/openproject/blob/dev/modules/meeting/app/components/work_package_meetings_tab/meeting_agenda_item_component.html.erb) (not exactly the same style)
* background color added via CSS (and might be a different shade of grey, `inset` vs. `muted`)