Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Aug 28, 2024

Summary

The header menu was still using legacy jQuery UI and duplicated styles in many places instead of reusing the header menu styles we use for the logged-in apps view.

So this PR is migrating that menu to Vue:

  1. Make our header actions declarative (adding a getData method that allows to just return the data needed for rendering)
  2. Keep render function for custom entries app developers might have implemented (so this PR is non breaking).
  3. Implement the header action menu and add generic entry components
  4. Implement special components for the "create federated share" entry and the "direct link" entry.
  5. Minor optimization: Add documentation for parameters.

Screen recording

Bildschirmaufnahme_20240830_162107.webm
Details First version:
Bildschirmaufnahme_20240828_143026.webm

Checklist

@susnux susnux added this to the Nextcloud 31 milestone Aug 28, 2024
@susnux susnux added design Design, UI, UX, etc. and removed technical debt labels Aug 28, 2024
@susnux susnux force-pushed the refactor/migrate-public-page-menu-vue branch 2 times, most recently from 4dbffa0 to 1fc41ee Compare August 28, 2024 16:27
jancborchardt

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@susnux susnux force-pushed the refactor/migrate-public-page-menu-vue branch from 1fc41ee to 0a49d60 Compare August 30, 2024 14:17
@susnux susnux requested a review from jancborchardt August 30, 2024 14:18
@susnux
Copy link
Contributor Author

susnux commented Aug 30, 2024

@jancborchardt all of the remarks are fixed, I updated the screen recording in the initial post to reflect the current state.

@susnux susnux force-pushed the refactor/migrate-public-page-menu-vue branch 2 times, most recently from 4a13c16 to 1312505 Compare September 3, 2024 11:29
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 3, 2024
@susnux susnux force-pushed the refactor/migrate-public-page-menu-vue branch from 1312505 to bf85548 Compare September 3, 2024 12:00
This adds a Vue implementation of the public page menu,
that is the menu that can be added using `PublicTemplateResponse::setHeaderActions`.

Co-authored-by: Ferdinand Thiessen <[email protected]>
Co-authored-by: Louis <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
This removes custom rendering code an replaces it with the declarative menu actions.
Also adjust the template to allow the Vue UI to mount.
Custom entries still are possible.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Keep them in the constructor to not break the API,
but they are not used anymore.
This way of adding a share was deprecated in Nextcloud 12 (2016!),
in favor of the federated share API, in Nextcloud 28 this way to create a share was removed.

So we can cleanup as all it takes now to create a federeated share is the share token + federated user ID.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the refactor/migrate-public-page-menu-vue branch from bf85548 to 0f76409 Compare September 3, 2024 14:12
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@nextcloud-command nextcloud-command force-pushed the refactor/migrate-public-page-menu-vue branch from 0f76409 to 5610821 Compare September 3, 2024 14:18
@susnux susnux merged commit f5f9691 into master Sep 3, 2024
@susnux susnux deleted the refactor/migrate-public-page-menu-vue branch September 3, 2024 15:12
@skjnldsv skjnldsv mentioned this pull request Jan 7, 2025
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 design Design, UI, UX, etc. enhancement feature: sharing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants