Add basic support for sass/scss files to Template manager editing#9871
Add basic support for sass/scss files to Template manager editing#9871brianteeman wants to merge 11 commits intojoomla:stagingfrom brianteeman:sass2
Conversation
|
I have tested this item 🔴 unsuccessfully on cb02eb7 "File with the same name already exists. Failed to create file." Test on Joomla! 3.5.2-dev This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
I have tested this item ✅ successfully on cb02eb7 After that i did:
|
|
BTW you can also have SCSS is the new version of SASS, i think. |
|
@andrepereiradasilva yes you can but its not as common I think I see the problem you both had and I dont know how to fix it. I am adding the file type sass in the options but its not seen until you open and save the options This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
Yes, but it seems in the new version, so if adding sass, shouldn't we also add scss?
i only see two ways: force updating the options parameters in the database on joomla update (IMO not B/C)... or adding a post install message to inform users of the change and what they need to do. I don't like neither. Most users don't even use this options. Is it worth it? |
|
We could add scss no problem I think the database update is what has been done before but I am not sure. On 12 April 2016 at 17:29, andrepereiradasilva notifications@github.com
Brian Teeman |
yes |
|
This PR has received new commits. CC: @andrepereiradasilva, @franz-wohlkoenig This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
This PR has received new commits. CC: @andrepereiradasilva, @franz-wohlkoenig This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
Updated to include scss files This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
I have tested this item ✅ successfully on 5d83f8b This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
@brianteeman i don't think we should overrwrite it with a db update as this can ause problems if somone has add / cahnge this setting bevor the update. (e.g. removed some extensions) if we include the db update we revert all changes he made. So this one will be only for new installs. The other way arround could be to analyse this setting during the update (script.php) and only add this two values in (if not set bevor) but leave the other one allown. But i think this is to mich code for a that simple change and if someone is come up and wantbto use it there can be a document page that explains the place to add the extensions. Another way arround could be a messagebif someone try to create a file with a extesion that is not in the allowed extension setting amd told the user "please add the extension to the settings" or something like that. |
|
The seccond option would also catch the case that somone manually removend some extensions form that list. |
|
I agree with your assessment - any idea how to do the second option? On 12 April 2016 at 18:13, zero-24 notifications@github.com wrote:
Brian Teeman |
|
Please have a look at: brianteeman#9 |
Add a message if the filetype is allowed but you are not allowed to show it in the backend
|
This PR has received new commits. CC: @andrepereiradasilva, @franz-wohlkoenig This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
I have merged the suggestion from @zero-24 please can you all test again This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
| return false; | ||
| } | ||
|
|
||
| $explodeArray = explode('.', $fileName); |
There was a problem hiding this comment.
What was this for and why are we removing it?
There was a problem hiding this comment.
OK I'm pretty sure this is going to break the less stuff as $ext is no longer defined for the line below
There was a problem hiding this comment.
This was from @zero-24 commit to my repo. Didnt understand it but took him at his word
There was a problem hiding this comment.
I think this looks fine with the exception of the removal of these two lines. Was there a reason for it @zero-24 ? Or just a mistake?
There was a problem hiding this comment.
Thanks @wilsonge you are correct i have changed this part many times on coding but i miss the final code review see here: brianteeman#10
|
This PR has received new commits. CC: @andrepereiradasilva, @franz-wohlkoenig This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
I have merged @zero-24 latest correction |
|
I have tested this item ✅ successfully on 2516589 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
And are they shown after you make the change from the message On 13 April 2016 at 07:01, Franz Wohlkönig notifications@github.com wrote:
Brian Teeman |
|
I thought its enough to know why the Files don't show. I don't know so i have to search how to "append the new File-Extensions in the List of supported Formats at the Template-Options". |
|
On the main template manager screen select options from the toolbar in the top right. |
|
Thanks @brianteeman Yes, they are now shown. |
|
Thanks for testing On 13 April 2016 at 09:21, Franz Wohlkönig notifications@github.com wrote:
Brian Teeman |
|
so what's needed to test now ? |
|
@andrepereiradasilva as before but if after applying the patch you have not updated the list of allowed extensions in the options you will still be able to create a file but you cant see it and so a message will be displayed |
|
I have tested this item ✅ successfully on 2516589 If so, tested successfully. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
ok, just tested. :) |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
@brianteeman cloud you please check the merge conflicts, thanks |
| * | ||
| * @return boolean true if the extension is allowed false otherwise | ||
| * | ||
| * @since 3.5.3 |
There was a problem hiding this comment.
@brianteeman can you fix than this since tag to 3.6 too?
# Conflicts: # plugins/editors/tinymce/tinymce.php
|
This PR has received new commits. CC: @andrepereiradasilva, @franz-wohlkoenig This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9871. |
|
@brianteeman Plese remove conficts markers |
|
Closed see #10186 |
Summary of Changes
Add ability to see sass files in the list of available files in the tree
Add ability to create a new file of type sass/scss
Add ability to open, edit and save a sass/scss file
Testing Instructions
Install patch and go to template manager and select a template (not a style)
Select New File from the toolbar
Create a new file and select sass from the file type dropdown
Check that file can be seen in the folder tree and can be selected, edited, saved and deleted