This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
[Metismenu] Rename metismenu layout and integrate js into build process #221
Merged
richard67
merged 15 commits into
development
from
development-rename-metismenu-layout-and-build-js
Nov 8, 2020
Merged
[Metismenu] Rename metismenu layout and integrate js into build process #221
richard67
merged 15 commits into
development
from
development-rename-metismenu-layout-and-build-js
Nov 8, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 2, 2020
…dia_source/templates/cassiopeia/js/mod_menu/menu-metismenu.js
richard67
force-pushed
the
development-rename-metismenu-layout-and-build-js
branch
from
November 3, 2020 08:42
f4716b4
to
becf804
Compare
richard67
changed the title
[Metismenu] [Draft] Rename metismenu layout and integrate js into build process
[Metismenu] Rename metismenu layout and integrate js into build process
Nov 8, 2020
chmst
approved these changes
Nov 8, 2020
Tested following the isntruction and looks good. Tested also with multiple dropdown menus. Works fine. |
richard67
deleted the
development-rename-metismenu-layout-and-build-js
branch
November 8, 2020 18:35
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request for Issues #195 (comment), #208 and #210 (comment).
Alternative to PR #217 and #224 .
Summary of Changes
This pull request (PR) changes the name of the layout to something more meaningful than "metismenu" and adds a language string for a nice layout name for the layout selection in the menu module's advanced options.
The name of the js file which already had es6 syntax is changed to extension
.es6.js
, and the file is moved to the right place in thebuild/media_source
folder so that it's transpiled and minified and put at the right place in themedia
folder by the build script.Finally, missing doc block with copyright information has been added to the js file.
Testing Instructions
If you have development environment for Joomla 4, checkout the development-rename-metismenu-layout-and-build-js branch, pull the latest changes, run "composer install" and "npm ci", and then make a new installation.
If you don't have that, use the following package to make a new installation: (obsolete link removed)
After that, login to backend and install "Blog Sample Data" to see the metismenu being used in frontend.
Then, still in backend, check the available layouts in the advanced options of the "Main Menu Blog" module.
Now go to frontend and verify that the metismenu works as well as before. You can also duplicate it in backend to another module position, or create another metismenu, and check in frontend that those modules still work well.
Last but not least, verify that in folder
media/templates/cassiopeia/js/mod_menu
(below the Joomla root, not the template folder) the following transpiled and minified js files are there:Finally, make a copy of the Cassiopeia template, make the copy be the default template and check in frontend if the metimenu works also with the template copy.
Actual result BEFORE applying this Pull Request
Layout selection in the menu module's advanced options:
The javascript file
templates/cassiopeia/js/mod_menu/menu-metismenu.js
to load the metismenus has es6 syntax but just a plain "js" file name extension. There is no minified file of it. The js linter will not run on that.Expected result AFTER applying this Pull Request
Layout selection in the menu module's advanced options:
The metismenu (one or more than one at a time) works as well as without this PR.
The javascript file
build/media_source/templates/cassiopeia/js/mod_menu/menu-metismenu.es6.js
to load the metismenu can be checked by the linter and is transpiled and copied to the right place by the build script.The metismenu continues to work on copied templates. Those still use the js file mentioned before.
Documentation Changes Required
The alternative layout should be described in the J4 documentation for the Cassiopeia template.