-
Notifications
You must be signed in to change notification settings - Fork 156
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
Changes to links in sidebar, fix tooltips #6959
Changes to links in sidebar, fix tooltips #6959
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
5214156
to
0e0efea
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.
Didn't dive too deeply yet but already looks pretty good from a quick glance. Added some polishing comments
CHANGELOG.md
Outdated
@@ -53,6 +54,15 @@ Summary | |||
Details | |||
------- | |||
|
|||
* Enhancement - Changes to links in sidebar, fix tooltips: [#6959](https://github.com/owncloud/web/pull/6959) |
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.
Please add this as an item to https://github.com/owncloud/web/tree/master/changelog/unreleased folder (similar to how it's done in oCIS/reva) and revert your changes to the CHANGELOG.md since that's an autogenerated file ;)
file() { | ||
return this.displayedItem.value | ||
}, | ||
|
||
isEos() { | ||
return !!this.configuration.options?.eos |
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.
Please add the eos config options to https://owncloud.dev/clients/web/getting-started/#options (markdown file in the docs/
directory in this repo) and ideally also with a default value in
options: { |
Also, we should think twice about naming before merging a new configuration option (because changing these later would mean a breaking change in terms of semver). Maybe |
a3d337e
to
0ef9042
Compare
All suggestions added! I changed |
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.
Just tried and it mostly looks good, have some code hygiene/a11y points to fix but that should be a quick one :)
<th scope="col" class="oc-pr-s" v-text="eosPathLabel" /> | ||
<td> | ||
<div class="oc-flex oc-flex-middle oc-flex-between oc-width-1-1"> | ||
<div class="oc-flex oc-flex-middle"> |
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.
The wrapping div around the <p>
tag is not necessary
<th scope="col" class="oc-pr-s" v-text="directLinkLabel" /> | ||
<td> | ||
<div class="oc-flex oc-flex-middle oc-flex-between oc-width-1-1"> | ||
<div class="oc-flex oc-flex-middle"> |
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.
The wrapping div around the <p>
tag is not necessary
/> | ||
</div> | ||
<oc-button | ||
oc-tooltip="Copy EOS path" |
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.
Please use a label
prop and this.$gettext()
here
<oc-button | ||
oc-tooltip="Copy EOS path" | ||
appearance="raw" | ||
aria-label="Copy EOS path" |
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.
Please use a label
prop and this.$gettext()
here
oc-tooltip="Copy EOS path" | ||
appearance="raw" | ||
aria-label="Copy EOS path" | ||
class="oc-files-private-link-copy-url" |
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.
The class looks wrong
<oc-button | ||
oc-tooltip="Copy direct link" | ||
appearance="raw" | ||
aria-label="Copy direct link" |
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.
Please use a label
prop and this.$gettext()
here
oc-tooltip="Copy direct link" | ||
appearance="raw" | ||
aria-label="Copy direct link" | ||
class="oc-files-private-link-copy-url" |
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.
The class looks wrong
:variation="copiedDirect ? 'success' : 'passive'" | ||
@click="copyDirectLinkToClipboard" | ||
> | ||
<span text="EOS Path" /> |
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.
Please use a label
prop and this.$gettext()
here
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.
Actually already exists as eosPathLabel
, just needs to be used
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 thinking I should remove these (this and line 101). They are not showing because text
is not a valid attribute so they are effectively empty. If I make them have something inside, we get this:
I assume there is no reason to have text there, but correct me if I'm wrong (pinging @diocas).
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.
You could use v-text
and a computed property to show text (text
itself won't work), but agreed that you could use an icon for "visual" usage and then both aria-label and tooltip on the wrapping button for contextual/screenreader help
:variation="copiedEos ? 'success' : 'passive'" | ||
@click="copyEosPathToClipboard" | ||
> | ||
<span text="EOS Path" /> |
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.
Please use a label
prop and this.$gettext()
here
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.
Same as #6959 (comment).
return !!this.configuration?.options?.runningOnEos | ||
}, | ||
|
||
hasSharees() { |
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.
From here to line 279 are not necessary in this component (possibly rebase-gone-wrong?), could you double-check and delete if you agree?
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.
Correct, this was included by mistake. I'll remove it.
Co-authored-by: elizavetaRa <svillyfly@mail.ru> Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch>
0ef9042
to
07f166f
Compare
I've applied all the suggestions (also removed some more stuff which didn't belong, like a getter used in the unneeded code you mentioned). Also, rebased to latest master. Let me know if I missed something! |
Kudos, SonarCloud Quality Gate passed! |
configuration: function () { | ||
return { | ||
options: { | ||
runningOnEos: true |
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.
We should test both variants, I can merge your PR into an intermediate branch and add this myself
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.
Good to go, I'll resolve a unit test improvement in my intermediate branch
* Changes to links in sidebar, fix tooltips (#6959) * Changes to links in sidebar, fix tooltips Co-authored-by: elizavetaRa <svillyfly@mail.ru> Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch> * Update tests * Apply suggestions * Fix labels, remove unused code Co-authored-by: Diogo Castro <diogo.castro@cern.ch> Co-authored-by: elizavetaRa <svillyfly@mail.ru> * Update unit tests & reword changelog Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch> Co-authored-by: Diogo Castro <diogo.castro@cern.ch> Co-authored-by: elizavetaRa <svillyfly@mail.ru>
Author: Pascal Wengerter <pwengerter@owncloud.com> Date: Wed May 18 10:13:58 2022 +0200 Port EOS details to details tab in files sidebar (#6997) * Changes to links in sidebar, fix tooltips (#6959) * Changes to links in sidebar, fix tooltips Co-authored-by: elizavetaRa <svillyfly@mail.ru> Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch> * Update tests * Apply suggestions * Fix labels, remove unused code Co-authored-by: Diogo Castro <diogo.castro@cern.ch> Co-authored-by: elizavetaRa <svillyfly@mail.ru> * Update unit tests & reword changelog Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch> Co-authored-by: Diogo Castro <diogo.castro@cern.ch> Co-authored-by: elizavetaRa <svillyfly@mail.ru>
This PR addresses some additions and fixes to the sidebar links:
isEos
setting intoconfig.json
as discussed in Customization of UI elements #6702 (comment)isEos
titleSomething
, all are nowlabelSomething
)nowrap
. This makes the table looks better, as there is no need to have colons in headers; and they are not extremely longCurrent looks: