-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(gui): Conditionally hide the Landscape Config page based on registry #835
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #835 +/- ##
==========================================
+ Coverage 88.25% 88.35% +0.10%
==========================================
Files 104 105 +1
Lines 6733 6758 +25
==========================================
+ Hits 5942 5971 +29
+ Misses 616 613 -3
+ Partials 175 174 -1 ☔ View full report in Codecov by Sentry. |
b6e8fc2
to
441b931
Compare
For reading keys from registry Or preloaded values for integration testing.
By default false. Affects the canConfigureLandscape getter. Simplify the sealed-hierarchy, removing unneeded parameters from derived classes constructors: - keep info about whether Landscape configuration is allowed in the base class. Adds test cases to assert that getter is false when Landscape is globally disabled no matter the config source.
The page itself doesn't change. But we need to pass a boolean flag from the app to the model. Here we use the Wizard route userdata param. More tests are added, to assert that the "Configure Landscape" button is not shown when globally disabled.
And propagate through the wizard: 1. The Landscape page is excluded from the Wizard if the feature is disabled. 2. SubscriptionStatus route userdata holds the flag, informing the respective page the situation of the Landscape feature.
Disabled by default Enabled via settings/registry Enabled on integration testing. Pass a bool flag to the SubscribeNowModel In the wizard composition, via the route userdata. No longer reading env vars. Updates tests.
That's affecting integration tests due render overflows.
441b931
to
1882839
Compare
There is a modest coverage on the lines reported as uncovered, because we don't report coverage of Flutter tests run on Windows (to avoid more complexity in CI installing tools to install tools on Windows to be able to parse and report coverage output). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did review the Dart/Flutter side as best of my knowledge. I agree it doesn’t worth checking and monitoring the registry for this and this is the best outcome I can think of.
Nice work!
... for developers and contributors. We don't show Landscape config page nor the subscribe button by default. Those willing to test those features by hand need to enable them explicitly via the Windows registry.
... for developers and contributors. We don't show Landscape config page nor the subscribe button by default. Those willing to test those features by hand need to enable them explicitly via the Windows registry.
(Opening this PR on top of #834 because otherwise CI won't go green ;) )
This implements a "Settings" feature on top of the Windows registry via which we can enable Landscape configuration and MS Store purchase (previously configured via an environment variable), which are both currently disabled by default.
We make sure to not depend on the Windows registry for integration testing, i.e. everything is tested as if all features are enabled.
For smaller test cases we test with both features enabled and disabled to ensure correctness.
This PR keeps the dependency on the Settings on the highest level, only propagating the decision to the implementation of the related pages.
While this is a simpler design, it has a drawback of not reacting to changes in the underlying data source (the Windows registry).
Adding a listener for registry changes is more complex and not worth in my opinion.
UDENG-3360