-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Media section: Move Action buttons to top, multiple selection #11589
Media section: Move Action buttons to top, multiple selection #11589
Conversation
renderStorage={ false } | ||
site={ this.props.site } | ||
view={ 'LIST' } | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A trivial detail, but sometimes you're closing the component instance on a new line and sometimes not.
client/my-sites/media/main.jsx
Outdated
@@ -28,7 +31,8 @@ export default React.createClass( { | |||
getInitialState: function() { | |||
return { | |||
editedItem: null, | |||
openedDetails: null, | |||
currentDetail: null, | |||
selectedImages: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing comma missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done a68b222
client/my-sites/media/main.jsx
Outdated
openDetailsModal( item ) { | ||
this.setState( { openedDetails: item } ); | ||
openDetailsModalForASingleImage( image ) { | ||
const selected = [ image ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that not much is gained by creating a constant here.
this.setState( {
currentDetail: 0,
selectedImages: [ image ]
} );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done a68b222
Yes, as in #10805 |
Since this is difficult to make small changes here without breaking the flow in editor, let's target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @artpi this looks like a good first step. Smoke tested functionality in both the modal and the section and things look good. We should be ok to land in the shared branch.
I did notice some small behavior differences that we can address in follow ups:
- In the media section select a number of items, click edit, page to some position other than the first item. Click "<- Media Library". Click Edit again. We start at position 0. (The media modal in the post editor remembers which item you had open).
- Navigate to the post editor. Open up the Media Modal. We see the selection from the media section.
@iamtakashi Did you intend for the detail/edit pages to be a modal in the media section? Or did we want those pieces to be inline? If it's the latter ping me and we can create more issues.
Yes. I think it should be the same as editing images from the modal. |
@iamtakashi To clarify the image editor will be a modal atm, but did we intend for things like the image title/details/url etc to be editable inline on a page view for the media section. |
That should be resolved in #11592 |
@gwwar I didn't consider inline editing like that at this moment. I can see the idea could work, but we'll have many questions to make it happen. I'll keep that mind! |
Thanks @iamtakashi 👍 |
1dd45d5
to
1796d15
Compare
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
* Make multiple selection work + admin bar * Fix single image edit * Mae bulk delete work * Reuse MediaModalSecondaryActions * Review fixes
@artpi This PR needs a rebase |
This PR resolves #11512, #10851 and puts some work towards #10805
The bar does not look how it should, continue in #10805 to make it look proper
Show me
CC @iamtakashi @rralian @retrofox @gwwar @lamosty