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

Pre dialog #19558

Merged
merged 6 commits into from
Dec 12, 2017
Merged

Pre dialog #19558

merged 6 commits into from
Dec 12, 2017

Conversation

Bjvanminnen
Copy link
Contributor

@Bjvanminnen Bjvanminnen commented Dec 8, 2017

image

This PR starts moving more LegacyDialogs to have React based contents instead of haml.

One could argue that we should instead take the time to just move these away from using LegacyDialog (which is still a pretty weird mishmash of React and jquery). However, that's (a) going to be a bigger change and (b) I think going to be easier by first moving the content to React.

Of the dialogs moved here, the "pre" dialog is the most interesting one. It was previously the case that you could, in LB, define a title/instructions/anigif for this dialog. This dialog was used in exactly 3 levels (plus 1 allthethingslevel), and was identical in every case. I then hardcoded the dialog, and made it so that pre_title is the only field we look at.

);
ContractMatchErrorDialog.propTypes = {
text: PropTypes.string
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've gone back and forth on whether it makes sense to have all of these defined in one place vs. defining each closer to where they are used. The reason I've been going with all in one place is that they are all pretty similar, and this makes this a lot clearer, and I think the long-term fix here should be to have a single React component for all of these (that doesn't use LegacyDialog).

@Bjvanminnen Bjvanminnen changed the base branch from staging-next to staging December 12, 2017 18:49
@Bjvanminnen Bjvanminnen merged commit 1293c32 into staging Dec 12, 2017
@Bjvanminnen Bjvanminnen deleted the preDialog branch December 12, 2017 21:14
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.

None yet

2 participants