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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add a preview to the poll builder #7988

Merged
merged 3 commits into from Aug 13, 2019

Conversation

@CvX
Copy link
Contributor

commented Aug 8, 2019

Closes https://meta.discourse.org/t/show-preview-in-poll-builder/117323/6

poll builder preview

Shout out to @pmusaraj for the recent poll builder tweaks. Saved me some CSS tweaking! 馃槂

I've hardcoded both column widths, which isn't ideal, but modal's max-width means that it expands horizontally as you type (until it reaches that max width). As far as I know, there is no way to force a flex element to fill all the available space up to the max-width. I'm open to suggestions. 馃槈

Oh, and the poll-ui-builder.hbs diff looks messy only because I've wrapped all the poll options in a <div class="options">.

@discoursebot

This comment has been minimized.

Copy link

commented Aug 8, 2019

Thanks for contributing this pull request! Could you please sign our CLA so we can review it? http://www.discourse.org/cla

@eviltrout

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

(confirmed CLA was signed)

@eviltrout

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

This looks quite good to me. Do you have any feedback @jjaffeux ?

@eviltrout eviltrout requested a review from jjaffeux Aug 12, 2019

@jjaffeux

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

LGTM 馃憤

Only thing, you could use the selectKit helper for your test:

const subject = selectKit(selector);
await subject.expand();
await subject.selectRowByValue("xxx");

It's more verbose but it ensures we respect some UI flow and also if we change select-kit internals we can still make tests work without changing them.

@jjaffeux

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Also minor but one .poll-ui-builder-form is in a poll.scss file and ther other in poll-ui-builder.scss file, should we move all in poll.scss or have another poll-ui-builder.scss for mobile?.

@CvX

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

Both are good points @jjaffeux, I've updated the PR. 馃檪

@CvX CvX force-pushed the CvX:poll-builder-preview branch from 485116c to b96727e Aug 13, 2019

@CvX

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

Tests failed due to an unrelated flaky test. Forcing rebuild.

@eviltrout

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Thanks, merging it in.

@eviltrout eviltrout merged commit 6a65e53 into discourse:master Aug 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can鈥檛 perform that action at this time.