Skip to content

Conversation

@weeklies
Copy link
Contributor

@weeklies weeklies commented Sep 11, 2025

Issue

https://otwarchive.atlassian.net/browse/AO3-7002

Purpose

Rewrite and use load_user_skinsload_official_skins during the initialization process.

  • Use File.exist? over removed File.exists?
  • Update README
  • Add support for parent_only skins through parent and top level skin subdirectories
  • Add support for /* MEDIA: */ and /* MEDIA: ENDMEDIA */
  • Set up Basic Formatting work skin as well

To reduce complexity, the following unused features are removed:

  • Remove support for /* REPLACE: */
  • Remove support for multiple skin declarations using /* END SKIN */

This does not change production behavior.

* Use File.exist? over removed File.exists?
* Add rake tasks to reset_database.sh
* Update README
* Add support for parent_only skins through a subdirectory
* Add support for /* MEDIA: */ and /* MEDIA: ENDMEDIA */

To reduce complexity, the following unused features are removed:
* Remove support for /* REPLACE: */
* Remove support for multiple skin declarations using /* END SKIN */
@weeklies weeklies marked this pull request as draft September 11, 2025 20:38
@weeklies weeklies marked this pull request as ready for review September 12, 2025 20:38
#end

unless !help_file.blank? && File.exists?("#{Rails.root}/public/#{help_file}")
unless help_file.present? && File.exist?("#{Rails.root}/public/#{help_file}")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't part of the issue, but I thought fixing the broken File.exists? here too would be helpful.

affect the skin on production! An admin will still need to edit the skin via
the admin interface and paste in the updated master version.

**Note**: To keep development data in sync with the master copies, please ensure any skin changes are mirrored in `site/user_skins_to_load`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a good idea -- it's simply too easy for things to get out of sync. We need an approach where we will only have one copy of each skin and then load them into the database from there. It's okay if that means adding code comments to the master copies, renaming the files, and/or moving them to a different directory, as long as we also keep the subdirectory structure.

(I don't think we need to stick with the user_skins_to_load name, either. It's an unintuitive name that makes it sound like we're loading skins for individual users rather than loading the officially supported skins for the chooser.)

@weeklies weeklies marked this pull request as ready for review September 18, 2025 21:20
@sarken
Copy link
Collaborator

sarken commented Oct 16, 2025

We discussed this a little and we'd like to take a different approach to this problem. Instead of putting information about the parents, media, and so on in the stylesheets and trying to parse it out with regular expressions, we'd like to move all of that information to the fixtures. Then the task can just be concerned with updating the skins' css fields to contain the CSS from the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants