Content
View differences
Updated by Alexander Coles 10 days ago
Primer's `HiddenTextExpander` ([edge Lookbook docs](https://qa.openproject-edge.com/lookbook/inspect/primer/alpha/hidden_text_expander/playground)) is currently used in at least two different ways:
1. **additional content is expanded inline**: on the Permissions Report and Workflows pages using the Stimulus `TruncationController`
1. Example: [https://qa.openproject-edge.com/admin/roles/report](https://qa.openproject-edge.com/admin/roles/report)
2. Example: [https://qa.openproject-edge.com/workflows/7/edit](https://qa.openproject-edge.com/workflows/7/edit)
2. **additional content is shown in a dialog**: where Project Attributes are rendered via `OpenProject::Common::AttributeComponent` and Stimulus `AttributeController`
These patterns should be documented in the Lookbook.
#### **Example 1**
#### <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921290/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921291/content">
#### Example 2
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921293/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921292/content">
### Scope (tbd)
Optionally, we may want to consider (or create separate work packages for):
* extracting one ~~or both~~ or both implementations into a higher-level component, e.g. `OpPrimer::ExpandableText` (done as part of <mention class="mention" data-id="75275" data-type="work_package" data-text="#75275">#75275</mention> ) `OpPrimer::TextWithExpander` (this could also be a separate Work package)
* investigating whether any `TruncationController` and `AttributesController` `StimulusController` implementation can be shared/DRY'ed up.
* evaiuate accessibility of both approaches.
<br>
1. **additional content is expanded inline**: on the Permissions Report and Workflows pages using the Stimulus `TruncationController`
1. Example: [https://qa.openproject-edge.com/admin/roles/report](https://qa.openproject-edge.com/admin/roles/report)
2. Example: [https://qa.openproject-edge.com/workflows/7/edit](https://qa.openproject-edge.com/workflows/7/edit)
2. **additional content is shown in a dialog**: where Project Attributes are rendered via `OpenProject::Common::AttributeComponent` and Stimulus `AttributeController`
These patterns should be documented in the Lookbook.
#### **Example 1**
#### <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921290/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921291/content">
#### Example 2
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921293/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921292/content">
### Scope (tbd)
Optionally, we may want to consider (or create separate work packages for):
* extracting one ~~or both~~
* investigating whether any `TruncationController` and `AttributesController`
* evaiuate accessibility of both approaches.
<br>