refactor(core): move AppMenu component tree into core/src/appmenu/#60937
refactor(core): move AppMenu component tree into core/src/appmenu/#60937pringelmann wants to merge 6 commits into
Conversation
dadde3f to
494e4c1
Compare
494e4c1 to
273ce20
Compare
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Mounts the waffle launcher from its own entry point, independent of core-main, and exposes OC.setNavigationCounter once mounted. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
AppMenu is now mounted by its own bootstrap. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Emit the AppMenu bootstrap as its own legacy entry point so it can be loaded as a standalone core script. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Register the core/appmenu entry in the user layout so the waffle launcher mounts like every other core script. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
273ce20 to
014f7a4
Compare
|
/compile amend |
014f7a4 to
8636ce7
Compare
susnux
left a comment
There was a problem hiding this comment.
How is this faster? Its so core-main where it was loaded previously is still loaded first.
Meaning its even is evaluated a bit later now because unified search and unsupported-browsers are evaluated before this script.
The only proper way to load this faster is to do an async loading which we already tried before but there we have the problem that the dependencies loaded in core-common need to be loaded which takes the most time.
It's faster because the old mount was inside the I will update the PR description explaining the actual mechanism in more detail. |
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
8636ce7 to
e1a531a
Compare
Summary
Moves AppMenu (the waffle) out of
core-maininto its owncore-appmenuchunk with a small bootstrap, loaded as a normal deferred core script. Drops the oldMainMenu.jsmount since the component now owns its entry point.This ensures the waffle menu appears sooner, allowing users to switch apps before page content loads.
How this works
On master the menu mounts inside
initCore(), which runs onDOMContentLoaded, so it only paints after the whole deferred-script queue (including the dashboard). The new chunk mounts at its own eval alongside unified-search, beforeDOMContentLoaded, so it shows up with the header instead of after the page finishes.Before:
waffle_before.mp4
After:
waffle_after.mp4
Nothing changes for users, the menu renders the same.
Changes
core-appmenuwebpack entry fromcore/src/appmenu/, pulled intocorevia addScript util.setUp()call ininit.js.core/src/components/MainMenu.js.Checklist
3. to review, feature component)