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

Port user menu to Vue #36232

Merged
merged 1 commit into from
Feb 11, 2023
Merged

Port user menu to Vue #36232

merged 1 commit into from
Feb 11, 2023

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented Jan 19, 2023

Summary

Move PHP user menu markup to Vue wrapped by the focus trapped NcHeaderMenu component

Before After
image image

Requires

Related

Checklist

@Pytal Pytal added the 2. developing Work in progress label Jan 19, 2023
@Pytal Pytal self-assigned this Jan 19, 2023
@Pytal Pytal force-pushed the enh/a11y-user-menu branch 5 times, most recently from 4c21322 to c2c704a Compare January 25, 2023 02:12
@Pytal Pytal changed the title [WIP] Port user menu Port user menu to Vue Jan 25, 2023
@Pytal
Copy link
Member Author

Pytal commented Jan 25, 2023

/backport to stable25

@Pytal Pytal marked this pull request as ready for review January 25, 2023 02:20
@Pytal Pytal added enhancement 3. to review Waiting for reviews accessibility and removed 2. developing Work in progress labels Jan 25, 2023
@Pytal Pytal added this to the Nextcloud 26 milestone Jan 25, 2023
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Not breaking the external sites app, if that is why my review was requested.
From the technical changes in this PR I'm the wrong person to judge

displayName: avatarDiv.dataset.displayname,
disableMenu: true,
disableTooltip: true,
const mountMenu = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Can we be fully sure that the UserMenu has already been rendered at this point? Otherwise this might need some way of handling to not end up with a menu without the profile link which might become hard to debug later on.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be as this is only executed when UserMenu has been mounted and emits core:user-menu:mounted

This only works as long as apps/user_status/src/menu.js is loaded before core/src/components/UserMenu.js, but if UserMenu.js loads and emits core:user-menu:mounted before menu.js can subscribe to the event then it wouldn't

For this I adjusted the logic to handle both cases

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Just some smaller comments, but looks good otherwise 👍

@Pytal Pytal force-pushed the enh/a11y-user-menu branch 2 times, most recently from a2726b4 to 77771f5 Compare January 26, 2023 02:17
apps/user_status/src/menu.js Outdated Show resolved Hide resolved
core/src/views/UserMenu.vue Outdated Show resolved Hide resolved
@Pytal Pytal changed the base branch from enh/allow-empty-route-xml to enh/allow-no-route February 3, 2023 01:25
@Pytal Pytal force-pushed the enh/a11y-user-menu branch from 1e6130b to 694f351 Compare February 3, 2023 01:26
@skjnldsv skjnldsv added 2. developing Work in progress 3. to review Waiting for reviews and removed 3. to review Waiting for reviews 2. developing Work in progress labels Feb 3, 2023
Base automatically changed from enh/allow-no-route to master February 3, 2023 11:54
@Pytal Pytal force-pushed the enh/a11y-user-menu branch from 694f351 to 79bd9aa Compare February 4, 2023 00:23
@Pytal
Copy link
Member Author

Pytal commented Feb 4, 2023

Rebased

@nickvergessen nickvergessen removed their request for review February 6, 2023 09:50
@miaulalala miaulalala removed their request for review February 7, 2023 13:00
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

Tested together with nextcloud/firstrunwizard#816 and works now but didnt review the code.

(Looks like the internal server issue was somehow caused by the viewer app not being installed).

@Pytal Pytal force-pushed the enh/a11y-user-menu branch from 79bd9aa to 71e9415 Compare February 9, 2023 18:59
@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 9, 2023
@Pytal Pytal force-pushed the enh/a11y-user-menu branch from 71e9415 to 5102ecc Compare February 10, 2023 00:33
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal force-pushed the enh/a11y-user-menu branch from 5102ecc to c779982 Compare February 10, 2023 01:55
@Pytal Pytal merged commit b59b8fd into master Feb 11, 2023
@Pytal Pytal deleted the enh/a11y-user-menu branch February 11, 2023 03:22
@blizzz blizzz mentioned this pull request Feb 13, 2023
@joshtrichards joshtrichards mentioned this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish accessibility enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants