-
Notifications
You must be signed in to change notification settings - Fork 212
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
Turn on additional search views frontend #4043
Conversation
fb04a93
to
2c7db67
Compare
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
2c7db67
to
6e24866
Compare
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.
Very nice. LGTM!
}, | ||
"description": "Toggle additional search views for tag/creator/source.", | ||
"defaultState": "off", |
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'm a little confused about what the "right" way to toggle the flag on in production is.
We set it to switchable, but default it to on. That means it's basically on in all environments, but an individual could switch it off by visiting /preferences
, right? In practice that's irrelevant to everyone except devs because /preferences
isn't linked anywhere.
So this feature flag setting could be simpified by: replacing the staging entry with a single production entry, set to enabled
, and removing defaultState
altogether. Thinking of this in stages, should we do this in two steps, first set production to switchable, default state off, and staging to enabled? And then confirm it in staging as a globally enabled preference (rather than a toggled one), and then update production
to enabled? It would be nice if we could control these using environment variables so that it doesn't take an entire new release for each stage to take effect.
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.
In production it seems that "switchable" is essentially "enabled" but with a convenience method for devs to see the disabled state.
Abstractly, I think the flow for launching frontend features should be:
- Enable the feature by default in staging, switchable but off by default in prod
- Test it in both of those contexts
- Enable it in prod
I think we could use a doc outlining how to prep and ship user-facing frontend (or API, for that matter) features. I'll create issues this week.
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.
This LGTM, I've just left a suggestion for how to either simplify the feature flag state, or an alternative staged deployment of the globally enabled feature (i.e., enable it globally in staging first, confirm it, then globally in production).
This is all well tested in e2e tests so I'm not too worried about it, and the consequence of a small bug in this feature that we haven't caught is a non-issue, from my perspective, but it's something we should consider for future features.
Fixes
Fixes #4035 by @obulat
Description
This PR makes the
additional_search_views
flag switchable in prod, and turns it on by default, effectively launching the additional search views.The test setup and checks had to be updated because the single result pages have slightly changed.
Testing Instructions
Build and run the app using
just frontend/run build
andjust frontend/run start
Go to
https://localhost:8443/search?q=cat
and select a search result (image/audio). The new page with link buttons and tags as links should be displayed by default.You should also be able to open the source/creator/tag pages, without setting the preferences previously.
If you go to
https://localhost:8443/preferences
, you can turnadditional_search_views
off to view the site without the additional views.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin