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

Fix: delete assistant modal title #180

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Fix: delete assistant modal title #180

merged 1 commit into from
Jan 28, 2025

Conversation

janepie
Copy link
Member

@janepie janepie commented Jan 23, 2025

fixes #118

keeps the string as labelId for accessibility reasons

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

This is the same for all full-size modals displayed in NC. If we decide it does not make sense to display a title for those, it should probably be changed in @nextcloud/vue.

Anyway, this fix is fine.

@@ -6,7 +6,7 @@
<NcModal v-if="show"
:size="modalSize"
:can-close="false"
:name="t('assistant', 'Nextcloud Assistant')"
:label-id="t('assistant', 'Nextcloud Assistant')"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if labelId is the right choice for this, as it takes an element id, I think, not a free-form string.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah damn you're right. i just checked, I cannot give the modal an aria label directly, it has to be through name or another element. What's the best way to work with that, creating a dummy element somehow?

Copy link
Member

Choose a reason for hiding this comment

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

You can try setting an aria-label to the modal component and check it appears in the UI.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh well, that actually worked, thanks 😅

Copy link
Member

Choose a reason for hiding this comment

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

git push? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

uuuhm sorry, done 😅 but we might also wait for nextcloud-libraries/nextcloud-vue#6434 with this, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

The modal opacity change does not require any change in the assistant so we can merge this PR IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but with that we could keep the title (do we want to keep it?)

Copy link
Member

Choose a reason for hiding this comment

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

Oh right, if the frame is not transparent anymore, then the issue is gone. Let's wait and close this PR if nextcloud-libraries/nextcloud-vue#6434 goes in.

It would be weird to remove the title while the frame is transparent and add it again when the frame becomes opaque.

@janepie janepie requested a review from marcelklehr January 23, 2025 15:32
@janepie janepie force-pushed the fix/no-modal-title branch from 893118c to 4c5e0cd Compare January 24, 2025 10:38
@@ -6,7 +6,7 @@
<NcModal v-if="show"
:size="modalSize"
:can-close="false"
:name="t('assistant', 'Nextcloud Assistant')"
:aria-label="t('assistant', 'Nextcloud Assistant')"
Copy link

Choose a reason for hiding this comment

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

You do not have to wait for the fix you can already force it:

Suggested change
:aria-label="t('assistant', 'Nextcloud Assistant')"
dark
:name="t('assistant', 'Nextcloud Assistant')"

Copy link
Member Author

Choose a reason for hiding this comment

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

Good to know, thanks!

Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
@janepie janepie force-pushed the fix/no-modal-title branch from 4c5e0cd to a2cf732 Compare January 27, 2025 14:32
@janepie janepie requested a review from julien-nc January 27, 2025 14:33
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

👌

@janepie janepie merged commit b72cece into main Jan 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI interferes with main Nextcloud navigation
4 participants