Flattening ACP Style Overrides during a Skin Clone

TiG
TiG
@tig
7 years ago
184 posts
Cloning a skin flattens templates (nice!) but it does not seem to do this for the ACP styles: Color and Font, Padding and Margin, Advanced and Untagged.

From my perspective it is important that everything possible be in files for obvious development reasons. Unfortunately to accomplish this it seems I must manually apply every ACP style override into the cloned skin's css files.

If there is an automated method for accomplishing this I would be quite happy to use it. :)


--
TiG

updated by @tig: 03/06/18 09:48:58AM
michael
@michael
7 years ago
7,746 posts
TiG:.....Unfortunately to accomplish this it seems I must manually apply every ACP style override into the cloned skin's css files....

OR..... you could take that all the CSS from the custom read-only tab and put it inot a file that loads after the generated one, then the same overrides would be applied as exist now, but just in the filesystem.

Been a long time since I looked at this area, will setup now to see what is happening, then come back with any other ideas that may work.
michael
@michael
7 years ago
7,746 posts
yeah, the STYLE tab info just gets copied over to the STYLE tab of the new skin, not flattened to the file system.

So best option.
* Copy all the css from the VIEW CHANGES tab.
* paste it into /skins/YOUR-SKIN/css/overrides.css (a new file you create)
* open /skins/YOUR-SKIN/include.php and add
    jrCore_register_module_feature('jrCore', 'css', 'xxYourSkin', 'overrides.css');
to the BOTTOM of all the other .css files registered there so it gets added last to the compiled css file.

* Upload that and reset the sites caches.

Not perfect, but beats adjusting the existing CSS files one by one with each change. Then just go forward with the file system option going forward.

(Not a great fan of the STYLE tab, but it does make it easier for those unfamiliar with web techniques to do basic adjustments so its necessary)
view_changes.jpg
view_changes.jpg  •  86KB

TiG
TiG
@tig
7 years ago
184 posts
@michael

One of my very first thoughts was to copy the View Changes info and try to apply the changes from there. My proof-of-concept was to take a copy and compare it to the .css file using PHPStorm. That demonstrated that there was no realistic way to use PHPStorm's convenient delta update functionality. The View Changes format is too different from the underlying file.

Overriding the files with copies (as you suggest) would of course work and with far less effort, but the end result is undesirable for future maintenance. Thus I will continue what I am doing - manually transferring ACP style changes to the underlying files. When done, I will have a file-based skin style. Then we will simply apply a discipline to ensure we remain file based.

Thanks for looking into this and offering suggestions. This is a lot mechanical work but it will be worth it in the end.


--
TiG
michael
@michael
7 years ago
7,746 posts
whats the delta update functionality?

Yeah, that's one of the downsides of inheriting a project. If you'd done it from the beginning no doubt all changes would have been made in the file system from start.

Sorry for not having a more convienient way to move from one update style to the other. good side: only have to do it once :)
TiG
TiG
@tig
7 years ago
184 posts
@michael - Absolutely - file system all the way; enable our power tools! I told Perrie the same thing, we do this once and move on. :)

The delta update is the line by line update that we can do while doing a file comparison in PHPStorm. Maybe terminology has changed, but we used to refer to differences as 'deltas' - mathematics.

Slightly off topic but related, we just did a trial run new skin install using the Marketplace. After the install, I activated and saved the new skin and then ran an integrity check with cache reset. Oddly, at least one template override did not engage. (Tinymce disappeared too from comments but I am still hunting that down.) While diagnosing the problem, I manually updated the aforementioned template override file to force it to be most current and it then showed up.

When installing a brand new skin with template and css overrides, is there anything else we should do other than make the new skin active, save and then do an integrity check?


--
TiG

updated by @tig: 12/04/17 08:35:49PM
michael
@michael
7 years ago
7,746 posts
That should be it. Clone, reset caches, run integrity check.

If something gets stuck, maybe manually reset the caches.
https://www.jamroom.net/the-jamroom-network/documentation/troubleshooting/114/somethings-wrong-what-do-i-do#manually-clearing-caches

The rest should be ready to go I'd expect.

Tags