-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Improve UX on modal for deleting an access token #19894
Changes from all commits
5a2add6
7a877a3
09ff43e
2c01ac0
0085767
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
<div class="content"> | ||
<strong>{{.Name}}</strong> | ||
<div class="activity meta"> | ||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i> | ||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -55,6 +55,12 @@ | |
</div> | ||
|
||
<div class="ui small basic delete modal" id="delete-token"> | ||
{{/* | ||
The wording here is a bit confusing. | ||
The action asks for deleting an access token. | ||
Confirming is therefore the destructive option and | ||
should be deemphasized because it cannot be undone. | ||
*/}} | ||
Comment on lines
+58
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we leave comments like this in the code. Haven't seen it before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was on the fence. But then looking at the template below where „yes” was in Now I don't want to make contributors hunt the code history to find the motivation. And the comment wouldn't get rendered out (I checked). Aside, Go files have comments for functions. I don't mind if I shall remove it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tbh would be better if the comment wouldn't be rendered to the client(if anyone wants to find this motivation, opting to go search it in the code should be de-facto default). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the template comments are rendered? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They aren't. I double checked. |
||
<div class="ui icon header"> | ||
{{svg "octicon-trash"}} | ||
{{.i18n.Tr "settings.access_token_deletion"}} | ||
|
@@ -63,11 +69,11 @@ | |
<p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p> | ||
</div> | ||
<div class="actions"> | ||
<div class="ui red basic inverted cancel button"> | ||
<div class="ui cancel button"> | ||
<i class="remove icon"></i> | ||
{{.i18n.Tr "modal.no"}} | ||
</div> | ||
<div class="ui green basic inverted ok button"> | ||
<div class="ui red basic inverted ok button"> | ||
<i class="checkmark icon"></i> | ||
{{.i18n.Tr "modal.yes"}} | ||
Comment on lines
74
to
78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are improving UX already, wouldn't it be better to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would trigger a change in the translation. I wrote my thoughts in #3589 (comment) Therefore, the PR only mentions, it is associated with the issue, i.e. not a complete fix. How long does it take to complete a translation cycle? I'm not sure, whether the Template should become a Vue component, for example. Or be made reusable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "How long does it take to complete a translation cycle?" PR changes the So, if there are active proof-readers, in (at most) 48h the translations can be updated, and there is still enough time before Gitea 1.17's release. ps: I think the text could be updated directly without considering the translation cycle. Personally I always update texts if they need to be updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#code-review
I will brew a follow-up PR with the wording changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR is already incredibly small. |
||
</div> | ||
|
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 can back this out if required. But double spaces itched me here. Is it about giving the icon some space?
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.
It's not unusual to sneak in some small code-style into a PR.