-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feat - EditPage, ImagesModal] Highlight selected image #124
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently in the ImagesModal or Images tab, if you click on Add New Image and select a file, then click exit on the ImageSettingsModal, you will not be able to select that image again - the file reader simply doesn't pop up. By clearing the target value on click, the onChange event will be triggered, whereas before, it does not get triggered since there is no change in target value
This commit changes the flow for image selection in EditPage. Instead of selecting the image on click, when a user clicks on an image in the ImagesModal, the image is first highlighted and the image must be selected using a Select button on the top right side
prestonlimlianjie
approved these changes
Feb 19, 2020
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.
lgtm
prestonlimlianjie
suggested changes
Feb 19, 2020
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.
Does this PR solve #125?
prestonlimlianjie
previously approved these changes
Feb 19, 2020
prestonlimlianjie
approved these changes
Feb 19, 2020
kwajiehao
added a commit
that referenced
this pull request
Mar 23, 2021
Thanks to PR #124 on the backend isomerpages/isomercms-backend#124, we can simplify the file-moving logic in `OverviewCard` since `OverviewCard` is now used only for unlinked pages in the workspace (it is also used for Resource Category display, but these do not have any move file functionality). This allows us to remove all the complex logic associated with file-moving and replace it with a single API call to the new file moving endpoint. This also allows us to delete the now-unused util function `saveFileAndRetrieveUrl`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR accomplishes the following:
ImagesModal
Previously in
EditPage
, when selecting an image inImagesModal
, the image would be selected on click. Now, users have to click on the image first and then click on the select button.Still considering: I'm wondering if we should keep
ImagesModal
as aPureComponent
or if we should delegate theselectedImage
state toImagesModal
and make it a functional component. Thoughts?Before
After