Skip to content

Invert opacity setting#379

Merged
Katsute merged 7 commits into
mainfrom
invert-opacity@f080e94
Aug 16, 2024
Merged

Invert opacity setting#379
Katsute merged 7 commits into
mainfrom
invert-opacity@f080e94

Conversation

@Katsute

@Katsute Katsute commented Aug 1, 2024

Copy link
Copy Markdown
Member

Relevant Issues

List any closed and/or relevant issues

Changes Made

List any changes made.

  • Invert opacity calculation
  • Add option to use old behavior

Release Notes

Going forward, to achieve parity with other background extensions, the opacity calculation will be switched from 0 visible and 1 invisible to 1 visible and 0 invisible.

To use the old behavior, use the useInvertedOpacity option. If you already have an opacity set, the inverted opacity setting will automatically be turned on.

@Katsute Katsute self-assigned this Aug 1, 2024
@Katsute Katsute added the v3 label Aug 1, 2024
@Katsute

Katsute commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

Use globalState to keep track if the migration process ran.

Use a key like migratedOpacity instead of a generic one as we may want to do more migrations in the future.

Migration logic must exist permanently so users that don't update for a long period still keep their settings.

On first launch:

  • If migrate has not ran:

    • If opacity value exists, turn the inverse opacity flag on
    • If opacity doesn't exist do nothing

    set migrate to true in globalState to indicate this already ran

  • If migrate has run:

    • Do nothing (do not re-migrate)

@Katsute

Katsute commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

Setting logic from #383 needs to be merged first so we can use it to check if opacity setting is set instead of falling back to the default

@Katsute
Katsute marked this pull request as ready for review August 10, 2024 00:53
@Katsute Katsute added this to the M3 milestone Aug 10, 2024
@Katsute

Katsute commented Aug 15, 2024

Copy link
Copy Markdown
Member Author

On update, VS complains that the manifest doesn't contain the new option, all while it IS using the updated code

Need to test with install/uninstall then new ver

@Katsute

Katsute commented Aug 16, 2024

Copy link
Copy Markdown
Member Author

✅ Install/Uninstall + VSIX Load passed

@Katsute

Katsute commented Aug 16, 2024

Copy link
Copy Markdown
Member Author

show notification on migrate

show notification on missing option (vscode bug) - prompt to reload

@Katsute

This comment has been minimized.

@kdevbot kdevbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by @Katsute

@Katsute Katsute changed the title Invert opacity Invert opacity setting Aug 16, 2024
@Katsute
Katsute added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit ea3df08 Aug 16, 2024
@Katsute
Katsute deleted the invert-opacity@f080e94 branch August 16, 2024 01:43
@kdevbot kdevbot Bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invert opacity setting

1 participant