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

fix #3749 fix #3750: audience form with saved data #4071

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

lmorchard
Copy link
Contributor

@lmorchard lmorchard commented Nov 21, 2020

Because:

  • we want to manage audience attributes for an experiment

This commit:

  • adds react-select as a dependency

  • introduces FormAudience component to manage audience attributes

  • displays saved audience data and uses configuration for valid choices

@lmorchard lmorchard changed the title issue #3749 issue #3750: progress on dummy audience form fix #3749 fix #3750: audience form with saved data Dec 1, 2020
@lmorchard lmorchard marked this pull request as ready for review December 1, 2020 23:30
@lmorchard
Copy link
Contributor Author

More to do here, but trying to stay roughly within the scope of EXP-488 & EXP-490 and keep the PR line count down. Actually saving edits to this data will be deferred to #3782 / EXP-506

@LZoog LZoog self-assigned this Dec 2, 2020
Copy link
Contributor

@LZoog LZoog left a comment

Choose a reason for hiding this comment

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

LGTM! Couple nits and I think we need a ticket for a quick follow up but nothing blocking r+.

</Form.Row>
</Form.Group>

<Form.Group className="bg-light p-3">
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think p-4 is a bit closer to Figma, as well as removing className="mb-3" on InputGroup on L99 and L126.

<Form.Control
placeholder="0.00"
aria-describedby="clientsPercent-unit"
type="text"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it could be nice to have the 4 inputs that only accept integers as type="number" for the up/down arrow selection and slightly better validation onblur.

I'm guessing some of these should have a maximum allowed value too - we could create a quick follow up ticket for that and throw it into the maintenance fix version. Since max values and the links mentioned in another comment will come from collab with someone (probably Ana), might make sense to make one task for both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Planning on doing this when I add validation in the next issue (#3782)

</div>
);

export const MOCK_EXPERIMENT = mockExperimentQuery("demo-slug", {})!.data!;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be minorly simplified to mockExperimentQuery("demo-slug").data!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is mainly left over from when I customized the experiment, but ended up gradually stripping all that out. This can go too

getConfig_nimbusConfig_channels,
} from "../../types/getConfig";

// TODO: find this doco URL
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have a couple of these "find link" TODOs now, one in Audience and one in Branches. We should probably have a follow up ticket made to find/fix these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed as "Find+fix all the TODO "find link" documentation URLs #4101".

<Form.Row>
<Form.Group as={Col} controlId="channel" md={8} lg={8}>
<Form.Label>Channel</Form.Label>
<Select
Copy link
Contributor

@LZoog LZoog Dec 2, 2020

Choose a reason for hiding this comment

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

This multiselect looks great! Not sure why "Select..." is a slightly different color but we can fine-tune stuff later (definitely not worth looking into if it's not quick, I mostly wanted to say the multi select is cool :D)

Because:

- we want to manage audience attributes for an experiment

This commit:

- adds react-select as a dependency

- introduces FormAudience component to manage audience attributes

- displays saved audience data and uses configuration for valid choices
@lmorchard
Copy link
Contributor Author

Fixing a couple nits. Then, going to merge in order to move on to #3782 for form validation and wiring up to GQL mutation

@lmorchard lmorchard merged commit e4d267c into main Dec 2, 2020
@lmorchard lmorchard deleted the 3749-audience-dummy-form branch December 2, 2020 19:05
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.

3 participants