User tests: Successful: Unsuccessful:
Project Repo PR: joomla-projects/gsoc21_core-enhancements#1
Plan Document: https://docs.google.com/document/d/1Pl8JGa2hkYkmJzQOn9_mS8a4imDmqc2a/edit#heading=h.gewhdn9rqyeh
This PR re-invents the unconventional method of placing modules from the Backend Dashboard to an easier to visualize series of steps where the users can visit a particular page in the Frontend (while logged in to an admin account) and from there, they can select the menu (automatically determined based on the page) and position of the Module by the means of buttons that reflect the output of where the module will be placed if the user proceeds to create it.
plg_system_addmodulebutton
for displaying the Add Module Button<main>
tag which is omnipresent on all pages.?pm=1
as a GET parameter in the URL. This is similar to the ?tp=1
parameter that is used for displaying template positions?pm=1
) View
administrator/index.php?option=com_modules&task=module.selectPosition&position=footer&menu=101
. This URL has 3 parts:
task=module.selectPosition
is used to call the selectPosition Controller in com_modules/module&position=footer
is used to pass the position as a GET param&menu=101
is used to pass the menu id of the current page as a GET paramHere is a video demonstration of the overall frontend flow :
Editing Modules in the Backend Admin Panel turned out to be a little tricky for the user if the template positions were not easy to visualize or if the User was unaware of the layout of the template positions. The old way for a user to get around this difficulty was to
?tp=1
as a param in the Page's URL (Might not be easy for users who do not have a technical background)To simplify all this into an easier and efficient method, a new modal has been added to select the positions via their preview. The video below demonstrates this new modal:
npm ci
because this PR involves re-building of assetsRefer to the two videos in the Summary of Changes section.
I'm not sure but I think this should be included in the Joomla Docs as a User Guide for the new feature.
@chmst @nibra @bembelimen
(and thanks @richard67)
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql com_modules Language & Strings Repository NPM Change JavaScript Installation Layout Libraries Front End Plugins Templates (site) |
Labels |
Added:
?
NPM Resource Changed
?
|
Whooo
Some initial observations - maybe more for the mentors than you.
As I stated before I do not like that this is dependent on the template being used. Surely if we can have a preview of template positions and a module edit button without requiring a change to the template it can be done here as well.
Why do I have to go to the very bottom of the page to "turn this on" - imagine navigating there without using a mouse. My first impression was that this was the only area I could insert a module. Do we even need this step? We don't need an additional step for editing modules.
When I select a "place module here" the site changes to the admin (without any notice), I have to log in and there is no method to return to the site once the module has been inserted. Why not use the existing frontend module editing form and existing authorisation - you just need to add a "select module" to that.
Why is this controlled and managed indpendently to the edit module options?
Final observation is regarding the confusion for users when adding a module who dont understand the difference between a menu and a page. For example if you have a blog category and then select an article and you see the add module button they will think they are adding it to the page with the article and will be surprised to see it has been added to every article in the blog
Thank you for this detailed and constructive feedback! I'm happy to learn where I can improve.
There are some points that I wish to address before my mentors comment on it
As I stated before I do not like that this is dependent on the template being used. Surely if we can have a preview of template positions and a module edit button without requiring a change to the template it can be done here as well.
I was unable to figure out a workaround to this. I will need some guidance from my mentors here. Thanks!
Why do I have to go to the very bottom of the page to "turn this on" - imagine navigating there without using a mouse. My first impression was that this was the only area I could insert a module. Do we even need this step? We don't need an additional step for editing modules.
Excellent Idea. I will try to re-position the button to be similar to the screenshot
When I select a "place module here" the site changes to the admin (without any notice), I have to log in and there is no method to return to the site once the module has been inserted. Why not use the existing frontend module editing form and existing authorisation - you just need to add a "select module" to that.
I thought about this, but the frontend edit module view doesn't have all the fields. To be specific, the Menu Assignment Tab wasn't present in the frontend edit view. I thought that this has been deliberately not included and hence I decided to proceed with redirection to the admin panel. Transferring this to the frontend can be done but it will definitely require some extra efforts and careful inspection of what is being copy-pasted from the administrator files which might get a little complicated. I would want to hear my mentor's opinion on this too.
Updated the Position and Style of the Add Module Button
The "Add Module" label and "Add a new module here" description being shown below each other for that button now seem to be redundant to me.
Why not just use label "Add New Module Here" or "Create Module Here"?
@brianteeman What do you suggest as native speaker?
I am not native speaker, but just wanted to say the same.
"Create a module" is better.
the l;anguage string is the least important thing to resolve on this pr and can be looked at later
I thought about this, but the frontend edit module view doesn't have all the fields. To be specific, the Menu Assignment Tab wasn't present in the frontend edit view. I thought that this has been deliberately not included and hence I decided to proceed with redirection to the admin panel. Transferring this to the frontend can be done but it will definitely require some extra efforts and careful inspection of what is being copy-pasted from the administrator files which might get a little complicated. I would want to hear my mentor's opinion on this too.
I think, we should keep this out from this PR
Labels |
Added:
?
Removed: ? |
After discussing @brianteeman's suggestions (Thank you for the same) with my Mentors, here's where we stand:
We discussed that the changes made in Cassiopeia's template files are fine since the feature doesn't depend upon it, ie. The code will still work for external templates that do not use it, just that the select-able positions would be limited to active positions only. Moreover, the Joomla Docs mention that:
Note that in some circumstances there may be module positions available that are not outlined in red. This can happen when a template defines those module positions as conditional on there being modules enabled in that position. If there are no modules enabled in that position, the template may adapt and the position will not be visible.
so each template can customize this and we're doing the same.
Before | After |
---|---|
![]() |
![]() |
Shows Only Active Positions | Shows All Positions |
Quoting what I wrote earlier:
I thought about this, but the frontend edit module view doesn't have all the fields. To be specific, the Menu Assignment Tab wasn't present in the frontend edit view. I thought that this has been deliberately not included and hence I decided to proceed with redirection to the admin panel. Transferring this to the frontend can be done but it will definitely require some extra efforts and careful inspection of what is being copy-pasted from the administrator files which might get a little complicated.
While the suggestion is very much apt and valid, Mentors agree that the missing extra tab is out of this PR's scope and it might be better to leave this as is in its current state.
This sure needs to be worked upon. I believe some rephrasing will be required in the button's tooltip description to clear this confusion. I believe that the feedback from the community would be the best source of inspiration for this.
I would like to discuss the future scope of this PR by requesting the maintainers to give their feedback on any other possible improvements that I might've missed out. Thank you
I have tested this item
Works as intended.
One possible addition to it: I would love to be able to have the option "Place Module here" while adding a module to the dashboard.
Thank you for testing!
One possible addition to it: I would love to be able to have the option "Place Module here" while adding a module to the dashboard.
That sounds like a good idea. I will probably open up a new PR in the future to extend this feature to the Dashboard.
Labels |
Added:
Language Change
Removed: ? |
Everything seems to work as intended. It's a nice feature and easy to use.
Some suggestions:
I haven't found a way to cancel the 'place module' mode. There should probably be a cancel button to improve usability.
The 'place module here' button should probably be tied to the positions, rather than individual modules, since it doesn't seem to actually place it in the order you'd expect (above or below the selected module).
Also, when you are not loged in as Admin in the Front-End but trying to use the 'Select From Template View' in the Back-End, you get an error stating that you need to be loged in first, so you have to login in the Template View in order to use this feature:
That beeing said, all these things are just suggestions to improve the useability of this feature, which is otherwise working just fine.
Thank you soo much for such a comprehensive feedback!
- The 'Add Module' button would be a perfect fit for a floating button. Something like this accessability button:
Nice Idea. I will discuss this with my mentors. I think we had decided to place the button in its current position because it resonated with the position fo the frontend editing button
- I haven't found a way to cancel the 'place module' mode. There should probably be a cancel button to improve usability.
Currently, pressing the back button on your browser would do the job of cancelling it but your feedback has helped me understand that the back button way isn't the best and it needs some sort of a cancel button. I appreciate this idea and I will think about the best way to implement this!
- The 'place module here' button should probably be tied to the positions, rather than individual modules, since it doesn't seem to actually place it in the order you'd expect (above or below the selected module).
I 100% agree with your point here, but there's just one tiny reason why I didn't decide to go forward with this. And that's because we would need to edit the template file in order to add this functionality and modifying the template file would be an issue for 3PD (third-party developers) as they would have to adapt to it accordingly. In the current iteration, everything would work without the need for 3PD having to modify their templates.
- Also, when you are not loged in as Admin in the Front-End but trying to use the 'Select From Template View' in the Back-End, you get an error stating that you need to be loged in first, so you have to login in the Template View in order to use this feature:
I had deliberately kept this check as I intended it to be more like an informatory warning which would prevent any person without permissions from being able to modify module positions while guiding the users with the access in modifying it.
I want to thank you again for taking time to review this PR and provide such a helpful and detailed feedback. I'm really grateful!
Labels |
Added:
?
Removed: ? |
Labels |
Added:
?
Removed: ? |
deleted this as its not related to this pr
I was really confused about this button. I thought when it said "add a new module here" the here meant something connected to the area on the screen that the button is located. I finally understand that there is just one button on the page.
This button is appended to the end of the
tag which is omnipresent on all pages.
Final comment on the frontend creation of modules.
Click on the button
-> select the position
-> log in to the admin
-> select the module
-> complete the module details and save
You are now stuck in the admin interface.
To return to the site you have to press back 4 times
Expected behaviour would be to return to the site and now you can see what you have done
Thank you soo much @brianteeman for such a thorough feedback! I agree with all the points that you stated. I will start working on these improvements.
Could someone add the "conflicting files" label please
This pull request has automatically rebased to 4.2-dev.
Unfortunately there are too many open questtions with 3rd party templates and template frameworks, no chance to make it compatible with all possible constellations.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-10-23 08:50:50 |
Closed_By | ⇒ | chmst | |
Labels |
Added:
Conflicting Files
?
Removed: ? |
@YatharthVyas It needs to add the new plugin to the list of core extensions here: https://github.com/joomla/joomla-cms/blob/4.1-dev/libraries/src/Extension/ExtensionHelper.php#L273 .