Skip to content

Conversation

friday
Copy link
Member

@friday friday commented Jul 14, 2022

This changes manifest.preferences to a dictionary, which makes more sense:

  1. Dictionary keys have the same constraints as what we need for the id (unique, non-empty strings), removing the need for some tests, validation and documentation.
  2. Easier to declare/read (less code).
  3. We can find the preference with preferences.get(id) instead of looping through all of them (slower and more code needed).

This change is fully backwards compatible. ExtensionManifest reformats the manifest as it loads it (this is something that I plan to let extension developers use to migrate extensions).

Checklist

  • Verify that the test command ./ul test is passing (the CI server will check this if you don't)
  • Update the documentation according to your changes (when applicable)
  • Write unit tests for your changes (when applicable)

@friday friday added this to the 6.0.0 milestone Jul 14, 2022
@friday friday merged commit 500bedd into v6 Jul 14, 2022
@friday friday deleted the prefs-manifest-dict branch July 14, 2022 15:12
@friday friday mentioned this pull request Jul 14, 2022
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.

1 participant