Enhancement 1: Place Modules | 21-6-2021 | Progress Report
By Private Profile 664b8893 on 2021-06-21 10:01 in GSoC 21 Feature Enhancement
Pull Request Link: https://github.com/joomla-projects/gsoc21_core-enhancements/pull/1
Plan Document: https://docs.google.com/document/d/1Pl8JGa2hkYkmJzQOn9_mS8a4imDmqc2a/edit#heading=h.gewhdn9rqyeh
Feature Scope:
- Adding Switcher Toggle to Global Configuration for Enabling Frontend Placements
- Rendering Add Module Button in Frontend conditionally based on the global configuration option
- Setting up ?pm=1 and rendering buttons and positions for it
- Passing data of position and menu assignment (pages) from the button to Add Module page
- Adding Preview link in backend’s add/edit module page
- Setting up the Modal for Backend
- Setting up the frontend view for the Modal and returning the data
Tasks Done:
1. Switcher Added in Global Configuration for Templates
2. Added the code in SQL Installation Script to set the default value of this Parameter upon the first installation
3. Add Module Button is displayed in `<main>` in Frontend when the above switcher is saved as 1 or True
4. Set up the view for `?pm=1` in Frontend (Here `pm` stands for Place(ing) Module)
5. The button in (3) is linked to this view
6. The preview shows the `Add Module Here` button for every position
7. The Add Module Button Works for Every Menu Page (not just index.php):
8. The Add Module Here Button is accessible as it also dictates the position:
9. Check for Permissions before displaying Place Modules Buttons for displaying the Add Modules Button and accessing the `?pm=1` view <br> <br>
10. Work in Progress on a Controller to set Position by passing data from the button. It displays Menu ID, template ID and name of the position.
11. Template ID in (10) is not required (I checked the databases and Models of Module's Add Methods) so it has been removed.
12. Rephrased Add Module Here button to Place Module Here to avoid confusion and generalize it for the Backend Preview Modal that we plan to implement.
13. Removed the HTML tags from language constants
14. Position is now pre-filled based on Frontend Placement Selection
15. Menu Position is now pre-selected
16. Made a few semantic changes
17. Wrapped up the positions preview modal
18. Updated the look of Add Modules Button
19. Added functionality to select each position via the iframe in backend flow's modal
To Do:
- UI Upgrades
- Make changes once reviewed by Mentors