User tests: Successful: Unsuccessful:
Pull Request for Issue # .
IntersectionObserver Refs:
Fetch the PR
run npm install
Check that the Cassiopeia move to the top button still works as expected
No this is just a rewrite of the script with modern JS, the functionality is the same
@wilsonge the js file although it's in the media folder IS NOT OVERRIDDABLE but it's just a step towards converting the Cassiopeia to parent template (eg supporting child templates)
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change Front End Templates (site) |
Labels |
Added:
?
NPM Resource Changed
|
Title |
|
Labels |
Added:
?
Removed: ? |
@HLeithner care to explain why the thumbs down?
I think it's wrong to split the template folder across the cms, it's already hard for new developer to create a template and it doesn't makes it easier.
Also I think making core templates a parent template would make us problems at a later point in time. because it means we can never remove it. Beside that we have no b/c promise on templates which makes it useless to create a child of it.
Beside that based on our B/C policy it says all JS functions and classes are covered, I might be wrong but I think you change them in this pr. (don't know why the JS B/C policy is more strict then all others in the cms).
it's already hard for new developer to create a template
So it's fine to use ES5 javascript...
because it means we can never remove it
False assumption. You can't also uninstall a template in use right now. But uninstalling all child tmpls then you can uninstall the parent
Beside that based on our B/C policy it says all JS functions and classes are covered,
There's NO B/C break here, I just wrote the same thing with modern code...
don't care if es5 (no idea why we ship it) or es6, it's about the fact that it's hard for a beginner to understand joomla templates.
Why do I have some files in the media folder? I mean everything was in the templates folder the last 16 years and now I have to put something into another folder?! I simple can't copy paste a template without any benefit (or at least I don't see any).
It about we es core does remove the template like we remove j3 templates (which I think is wrong but nobody had the time or the willing to adapt it to j4).
It about we es core does remove the template like we remove j3 templates
Still, you can check if there are child templates and act accordingly, or do it the Jway and remove everything
Why do I have some files in the media folder?
Well, ALL other extensions have their static assets in the media folder. Also, this is about security, locking down everything apart from media/images and couple .php is way easier if ALL static files are in one place. This was explained time and time again...
I mean everything was in the templates folder the last 16 years and now I have to put something into another folder?
You can still do it the old way, it's not broken...
Parts of cassiopeia are already in the media folder - the horse has already bolted on that
(not commenting either way about if its good or bad)
It about we es core does remove the template like we remove j3 templates (which I think is wrong but nobody had the time or the willing to adapt it to j4).
I don't remember ever seeing an issue about that.
Parts of cassiopeia are already in the media folder - the horse has already bolted on that
(not commenting either way about if its good or bad)
Doesn't matter, he asked me why I gave thumbsdown.
And a error can be reverted.
I think it's wrong to make the template more completed. Not more not less. It makes it harder for new people and for veterans.
I see no benefit also for security it doesn't matter because you can't looked down the template folder for the same reason none of our folders is locked down.
It about we es core does remove the template like we remove j3 templates (which I think is wrong but nobody had the time or the willing to adapt it to j4).
I don't remember ever seeing an issue about that.
So you think there are 0 people wondering why there template doesn't exists anymore after j4 upgrade?
It about we es core does remove the template like we remove j3 templates (which I think is wrong but nobody had the time or the willing to adapt it to j4).
I don't remember ever seeing an issue about that.
So you think there are 0 people wondering why there template doesn't exists anymore after j4 upgrade?
No I am simply saying that I don't remember seeing an issue about removing j3 templates OR an issue about converting protostar to J3
Never mind me asking... But, do we have child templates in J4???
@dgrammatiko Thanks for the feedback!
I have tested this item
Tested the patch and it works. Maybe we need documentation changes as the /js folder is now missing in the Cassiopeia template. It now also needs to be created when we want to use the user.js file.
Labels |
Added:
?
Removed: ? |
I think it's wrong to make the template more completed. Not more not less. It makes it harder for new people and for veterans.
@HLeithner you are totally wrong here. The only things that changed for supporting Child templates are:
templates/{administrator / site}/templateName
ALL THESE COULD BE DONE IN THE BUILD STEP OF THE TEMPLATE. I will provide a simple one line command (npx convert-joomla-template
) that will repackage an existing template to meet these requirements (moving folders to media and update the XML). Although most devs already have their own tools and this won't be a problem.
Also my work on the com_templates really makes all these changes completely transparent to non dev users.
So my question is then: why do you thing that the 15 years old way of doing templates cannot or should not be improved? (especially when the whole point is primary a security concern, templates should not be exposed as entry points in any website, actually Joomla's entry points should be: /index.php
, /administrator/index.php
, /administrator/com_joomlaupdate/restore.php
, media
, images
. Everything else should not be exposed, security 101...)
@dgrammatiko you maybe be right with being more consistent and to remove the direct call to /templates/xxx.
I would really like to see a .htaccess with where only the mentioned core files are accessible (and core folders are forbidden) and can be moved out of of the public folder.
and can be moved out of of the public folder.
Baby steps...
and can be moved out of of the public folder.
Baby steps...
It's not about steps it's more about having a plan/big picture.
@HLeithner fwiw here's a tool for automating the conversion of the templates: https://github.com/dgrammatiko/convert-template
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-06 17:12:58 |
Closed_By | ⇒ | dgrammatiko |
I'll care later with another PR for the files deletion on update in script.php if this PR gets merged, so no need to do it here. PR is fine as is regarding that.