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

UI flags method names suggestions #572

Open
sjparkinson opened this issue Aug 29, 2019 · 1 comment
Open

UI flags method names suggestions #572

sjparkinson opened this issue Aug 29, 2019 · 1 comment

Comments

@sjparkinson
Copy link

Consideration for @financial-times/dotcom-ui-flags in the next major version.

We could change the methods to be more domain specific, e.g.

import * as pageKitFlags from '@financial-times/dotcom-ui-flags';

const flagsClient = pageKitFlags.init();

flagsClient.getState('oTracking');

// OR...

flagsClient.isActive('oTracking');

At the moment with the method only being get, that could also mean get the full flag model, rather than only the state.

@i-like-robots
Copy link
Contributor

I'm not sure if this is covered in the code but it really should be... The flags client has been designed to match the existing implementation in n-ui. This is because we have a number of n- components and existing app integrations which expect a .get(flagName) method which returns the current value.

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

No branches or pull requests

2 participants