Skip to content

Conversation

@AprilSylph
Copy link
Owner

Description

Updates src/action/** and src/utils/preferences.js' internal-only terminology of "scripts" to "features", to match our new directory structure (as of v1.0.0) and our documentation.

This PR intentionally does not update the "enabledScripts" storage key or any of its usages, since this PR is already rather big, and by its nature of doing mass-renaming should be tested thoroughly; adding any migratory code for "enabledScripts""enabledFeatures" would fall outside the scope of this testing.

I also haven't touched src/content_scripts/main.js, because 1) that file really does primarily deal with features' scripts (being the thing that runs them), and 2) it would be confusing to update its terminology while keeping the enabledScripts name intact.

Testing steps

  1. Load the modified addon
  2. Open the XKit control panel
    • Expected result: All features render their information (icon, title, description) with no obvious visual changes vs the latest release version
    • Expected result: All feature preference types render with no obvious visual changes vs the latest release version
      • checkbox (as used by e.g. AccessKit)
      • text (as used by e.g. Quick Reblog)
      • color (as used by Painter)
      • select (as used by e.g. AccessKit)
      • textarea (as used by e.g. CleanFeed)
      • iframe (as used by e.g. PostBlock)
  3. Search for a feature in the control panel
    • Expected result: For a valid search/filter, non-matching feature results are hidden
    • Expected result: For an invalid search/filter, all features are hidden and "No results found" is shown instead
  4. Clear your search/filters
    • Expected result: All features are shown again
  5. Open the preferences for a feature that has no preferences (e.g. Limit Checker)
    • Expected result: The empty state verbiage says "No preferences available for this feature."
  6. Enable or disable a feature
    • Expected result: Your change is reflected on Tumblr, or in the control panel's Backup tab
      (whichever is more convenient to test)
  7. Change a feature's preferences
    • Expected result: Your changes are reflected on Tumblr, or in the control panel's Backup tab
      (whichever is more convenient to test)

@AprilSylph AprilSylph requested a review from marcustyphoon July 7, 2025 14:42
@marcustyphoon
Copy link
Collaborator

"title": "Example Script",

Not exactly relevant, but... kind of relevant?

@marcustyphoon
Copy link
Collaborator

I think if it were me I would probably do const enabledFeaturesKey = 'enabledScripts'; and include the usage changes in the same PR without including the storage migration, but it really doesn't matter :D

@AprilSylph AprilSylph merged commit 8af5362 into master Jul 8, 2025
5 checks passed
@AprilSylph AprilSylph deleted the aprilsylph/features-not-scripts branch July 8, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants