-
-
Notifications
You must be signed in to change notification settings - Fork 7
Enable users to switch flags on/off using querystring #12
Comments
Hey @peterhartree, I've made a start on this on via a feature branch feat/query-string which at the moment enables a flag (even if it's disabled by the current user) if the following conditions are met:
E.g: Visiting
I'm interested to hear more about replicating the current flag statues. Are you thinking it would be useful to have a query string that can enable multiple flags at once? |
without needing to login. See #12.
Nice!!
Yes. I think it should be possible to disable flags via querystring as well. I'm imagining a query string that looks something like I can imagine a case where we have e.g. 10 flags registered and I don't know which flags the user currently has enabled. To avoid confusion, I may want to send a link that sets all the users flags to the exactly intended state. So it'd be useful if, from the WP admin flag settings page, I could copy-paste a link that sets all flags to the state they're in for the currently logged in user. |
Ah, I see. Chaining a lot of flags could get a little messy, maybe the facility for people to set up groups of flags that are enabled by a custom list parameter? This would give you the option to setup say I'm imagining these groups being shared by all WordPress admin users rather than the current per user activation. So you would create the "April Demo" feature group/set and then add specific flags to the set and those are enabled whenever you use the custom defined query string. |
Yep, flag groups sounds like the ideal solution here. Chaining ungrouped flags with any easy to copy-paste URL seems like a "good enough" approach, so if it's much easier to implement maybe that's the way to go initially. |
This is pinned to be my next core feature to work on before an initial release. Made a note to also potentially make the query string configurable by the users rather than lumping them with variations of |
Had a thought while working on an implementation for this. Would it make sense for a user to be able to publish/preview a group of flags? I've just realised my plan with the groups would only allow them to be queried but this is quite limiting. Wouldn't it make sense to be able to preview a group of features at once? N.B Going to move this to its own issue rather than polluting the original idea of toggling features with a query string. |
Closing this as the toggle by query string feature has been implemented and I've split the groups' discussion into #21. |
There are a bunch of use cases where it'd be convenient to be able to send WordPress users a link with querystring variables that switch flags on or off.
For example, I want to show a colleague a thing I'm working on. I just want to send them a link to the site with feature flags configured as required for them to preview. I don't want to have to tell them to go to the WordPress admin settings page and then configure flags.
A couple of implementation details that come to mind:
The text was updated successfully, but these errors were encountered: