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

Update page to v2.11.0 #218

Merged
merged 10 commits into from
Oct 23, 2018
Merged

Update page to v2.11.0 #218

merged 10 commits into from
Oct 23, 2018

Conversation

andrewpye
Copy link
Member

Closes #217 by adding titleMetadata and primary support to page header.

Screen grab with titleMetadata=(component "polaris-badge" status="success" text="Metadata") and primaryAction=(hash primary=false ...):

image

@andrewpye andrewpye added the enhancement New feature or request label Oct 22, 2018
@andrewpye andrewpye self-assigned this Oct 22, 2018
@@ -104,4 +115,11 @@ export default Component.extend({
hasActions: or('primaryAction', 'secondaryActions').readOnly(),
hasSecondaryActions: gt('secondaryActions.length', 0).readOnly(),
hasRollup: gt('secondaryActions.length', 1).readOnly(),

shouldRenderPrimaryActionAsPrimary: computed('primaryAction.primary', function() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Very happy to rename this if anyone can think of anything better 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it's weird that this is a thing now but 🤷‍♂️ I'm good with it

Copy link
Contributor

@tomnez tomnez left a comment

Choose a reason for hiding this comment

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

🎉 LGTM

@@ -104,4 +115,11 @@ export default Component.extend({
hasActions: or('primaryAction', 'secondaryActions').readOnly(),
hasSecondaryActions: gt('secondaryActions.length', 0).readOnly(),
hasRollup: gt('secondaryActions.length', 1).readOnly(),

shouldRenderPrimaryActionAsPrimary: computed('primaryAction.primary', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it's weird that this is a thing now but 🤷‍♂️ I'm good with it

Copy link
Contributor

@sivakumar-kailasam sivakumar-kailasam left a comment

Choose a reason for hiding this comment

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

Looks good. Can we add a test for this?

@andrewpye
Copy link
Member Author

@sivakumar-kailasam I wasn't going to because there aren't any tests for either of these features in the React implementation at the moment. Can add some if @vladucu / @tomnez think it's worthwhile though...

@vladucu
Copy link
Member

vladucu commented Oct 23, 2018

Would be nice to drop in a quick test, nothing fancy, just that we render these properties correctly
Everything else looks good though

@andrewpye
Copy link
Member Author

@sivakumar-kailasam @vladucu added a couple of tests, not run codemods on them though because it causes issues with registering the mock svg-jar helper and I figured we could use our time more productively at this point

Copy link
Member

@vladucu vladucu left a comment

Choose a reason for hiding this comment

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

👍

@andrewpye andrewpye merged commit 20bed91 into dev Oct 23, 2018
@delete-merged-branch delete-merged-branch bot deleted the enhancement/update-page-to-v2.11.0 branch October 23, 2018 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants