Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter screenshot by environment (elementary#2210) #2225

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

edwood-grant
Copy link
Contributor

@edwood-grant edwood-grant commented Dec 8, 2024

Short summary

Aims to implement #2210

Will read the environment property of the screenshot and will filter it out if:

  • Prefer dark mode is true, and the screenshot does not have a dark mode environment id (i.e. 'dark' in the environment ID).
  • Prefer dark mode is false, and the screenshot does have a dark mode environment id.

This won't consider null environments in the screenshots.

Tests

I have only tested this on the Harvey application, since this is the only app that I know has this implemented. I also tried a random assortment of titles with and without screenshots without any problems/crashes, though.

italo-capasso added 3 commits December 8, 2024 08:31
Will read the environment property of the
screenshot and will only show them if prefer dark
mode is enabled in the system and the screenshot
has a dark mode environment (i.e. has ':dark' in
the environment id). Won't consider null
environments in the screenshots.
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

Looks good to me! Nice work 🎉

@danirabbit danirabbit merged commit 5e99390 into elementary:main Dec 9, 2024
4 checks passed
@edwood-grant edwood-grant deleted the italo-capasso/issue-2210 branch December 17, 2024 14:07
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.

2 participants