-
Notifications
You must be signed in to change notification settings - Fork 6
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: add image editor in dataset form (#2180) #2246
Conversation
You can access the deployment of this PR at https://renku-ci-ui-2246.dev.renku.ch |
a870884
to
37de9a9
Compare
37de9a9
to
d64bcbf
Compare
d64bcbf
to
c0e8d6c
Compare
c0e8d6c
to
9ba7b62
Compare
9ba7b62
to
ddcefcc
Compare
ddcefcc
to
b43be97
Compare
b43be97
to
d645243
Compare
d645243
to
a5a8feb
Compare
a5a8feb
to
2440494
Compare
2440494
to
e5ab5dd
Compare
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.
Very nice implementation. The edit feature looks good and works well!
I have a few minor things that could be improved.
-
It was not immediately obvious that I could reposition the center of the image. I think either adding some text to say that you can reposition the image or some controls (arrows) to move the center would make this clearer
-
It would be nice to have a "Reset" button to go back to how the image looked in the beginning.
-
The image "moves" when switching to "Edit," even though I did not reposition the image
@@ -109,7 +109,7 @@ function DisplayFiles(props) { | |||
} | |||
|
|||
function DisplayProjects(props) { | |||
if (props.projects === undefined) return null; | |||
if (props?.projects === undefined) return null; |
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.
Can props be undefined?
@@ -618,9 +618,9 @@ const datasetFormSchema = new Schema({ | |||
label: "Image", | |||
edit: true, | |||
type: FormGenerator.FieldTypes.IMAGE, | |||
maxSize: 200 * 1024, | |||
maxSize: 10000 * 1024, |
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.
This seems like a very high size limit to me. I can understand wanting to permit images larger than 200KB, but 10MB seems really big. I think 2MB would be a good big image size.
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.
This is just for selecting the image, the uploaded one should be resized/downgraded to <200kb.
We can allow for bigger images here. Maybe users wish to take just a tiny part of a bigger image (E.G. I often take a full-screen screenshot and use just a tiny part from it -- that would be bigger than 2MB)
bdba857
to
16c7009
Compare
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 like the new changes, I think this works very well!
I found one small problem, which is that the old images seem to be cached in the dataset. Try the following:
- create a dataset (with an avatar image)
- change the avatar
Then the UI will still show the old image. If you refresh the page, the new image will appear, but not until then.
6d04659
to
2155b69
Compare
2155b69
to
f522f51
Compare
…ts even if it cannot be edited
f522f51
to
7664b39
Compare
Thanks @ciyer for reporting this, I have added a workaround to display the latest image available. |
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.
👍
Tearing down the temporary RenkuLab deplyoment for this PR. |
PR to add image editor.
Note: Also included the correction of the title in the project header when an image already exists.
Closes #2180
/deploy renku=000-cypres-tests-new-search #persist #cypress