-
Notifications
You must be signed in to change notification settings - Fork 1
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
Per 8562 indicate fields that are editable #343
Per 8562 indicate fields that are editable #343
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #343 +/- ##
=======================================
Coverage 35.68% 35.68%
=======================================
Files 299 299
Lines 10377 10379 +2
Branches 1719 1719
=======================================
+ Hits 3703 3704 +1
- Misses 6528 6529 +1
Partials 146 146 ☔ View full report in Codecov by Sentry. |
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.
Left a question about some of the new inputs introduced in the code. Also, while the ticket mentioned that we might want to include an icon, I will say that adding that icon creates visual inconsistency between the fullscreen and standard metadata editors; the fullscreen one has icons and the "normal" editor doesn't. This is more of a thing for @k8lyn6 to discuss during review but I wanted to bring it up.
@@ -121,6 +122,8 @@ export class FileViewerComponent implements OnInit, OnDestroy { | |||
AccessRole.Editor | |||
) && !route.snapshot.data?.isPublicArchive; | |||
|
|||
this.canEditFieldsOnFullscreen = this.canEdit && this.canEditOnFullScreen(); |
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'm a bit confused on the purpose of this variable. Is there ever a case where canEdit
and canEditFieldsOnFullscreen
are going to be different values? I'm not sure if there's a special case but I would think that anything that fullscreen editing shouldn't have different permissions from normal editing (especially since canEdit
already checks if the file in question is a Public Archive or not).
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.
@meisekimiu good point, but the ticket was suggesting adding the text only in fullscreen mode, not in the file list viewer, that's my reasoning. That is why I am making use of the routes. Should I change it?
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.
Outcome: we'll use canEdit
everywhere.
4e80aab
to
29f05a7
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.
This looks good! I think we should probably remove the icon -- I like it better without them, and it looks like they don't show up consistently anyway (I wasn't seeing it on the tags if you already have tags entered)
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.
Works well!
…an in the html code
60c8b24
to
9703c7d
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.
Looks good!
Steps to test:
1.Open any uploaded file in the full screen viewer.
2. Notice that an icon and Click to add text is present for tags and location (description already had a helper text and the name cannot be deleted.)