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

Editor: add highlight to mark current draft in Drafts. #1177

Merged
merged 2 commits into from
Dec 3, 2015

Conversation

mtias
Copy link
Member

@mtias mtias commented Dec 2, 2015

Adds a visual mark (same as used in notifications panel) to mark the draft you are currently editing in the drafts drawer.

image

@mtias mtias added Posts [Feature] Post/Page Editor The editor for editing posts and pages. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR Components labels Dec 2, 2015
@artpi
Copy link
Contributor

artpi commented Dec 2, 2015

Warning: Failed propType: Invalid prop `selectedId` of type `boolean` supplied to `Drafts`, expected `number`. Check the render method of `DraftList`.

@artpi
Copy link
Contributor

artpi commented Dec 2, 2015

After reload, I am unable to reproduce the error above...
Maybe someone else has the same issue?

Design is good, everything works.

🚢

Warning: Failed propType: Invalid prop `selectedId` of type `boolean`
supplied to `DraftList`, expected `number`. Check the render method of
`PostEditor`.

Warning: Failed propType: Invalid prop `selectedId` of type `boolean`
supplied to `Drafts`, expected `number`. Check the render method of
`DraftList`.

React treats { undefined } as a boolean for whatever reason.
@nylen
Copy link
Contributor

nylen commented Dec 2, 2015

Fixed the propType warnings in 7a9e091. selectedId={ this.props.post.ID } was passing undefined when editing a new post. For whatever reason, React was treating this as a boolean. Using null instead works fine.

Nice change, I think it is good to go now.

@mtias
Copy link
Member Author

mtias commented Dec 3, 2015

Thanks @nylen! I'm traveling today, so anyone, feel free to merge.

artpi added a commit that referenced this pull request Dec 3, 2015
Editor: add highlight to mark current draft in Drafts.
@artpi artpi merged commit 77a7ed7 into master Dec 3, 2015
@scruffian scruffian removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Ready to Merge labels Dec 3, 2015
@artpi artpi deleted the add/current-draft-highlight branch December 3, 2015 11:10
@artpi artpi removed the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Dec 3, 2015
@artpi
Copy link
Contributor

artpi commented Dec 3, 2015

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Components [Feature] Post/Page Editor The editor for editing posts and pages. Posts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants