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

feat(NcAppSidebar): Add subname slot #5285

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Feb 21, 2024

☑️ Resolves

This adds a subname slot for the same purpose as the subname prop, but this allows more advanced usage.
My use case: Add an icon with alt text / aria label.

Nextcloud files does not use the starred button anymore (design decision) but simply an action menu entry + an ⭐ icon on the subname.
The problem is that the star icon (just a unicode symbol) is not announced by screen readers, so we need some accessible alternative. Fixed by allowing inline content as the slot content.

To implement this I also added an inline prop to the SVG icon wrapper to allow it to render icons inline (this is BTW something I really often saw people "hack" into the component using deep selectors to get rid of the min-width and min-height).

🖼️ Screenshots

Inline icon:
image

App sidebar:
image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

…e item

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews feature: app-sidebar Related to the app-sidebar component labels Feb 21, 2024
@susnux susnux added this to the 8.8.0 milestone Feb 21, 2024
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to explain the background :)

@skjnldsv skjnldsv merged commit 12b5a90 into master Feb 22, 2024
18 checks passed
@skjnldsv skjnldsv deleted the feat/app-sidebar-add-subname-slot branch February 22, 2024 09:23
@Antreesy Antreesy mentioned this pull request Feb 29, 2024
@ShGKme ShGKme mentioned this pull request Feb 29, 2024
@susnux
Copy link
Contributor Author

susnux commented Apr 9, 2024

/backport to next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feature: app-sidebar Related to the app-sidebar component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants