Skip to content
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

Conversation

javfg
Copy link
Contributor

@javfg javfg commented May 12, 2022

This PR addresses some additions and fixes to the sidebar links:

Current looks:

image

@update-docs
Copy link

update-docs bot commented May 12, 2022

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.

@javfg javfg force-pushed the fix-sidebar-links-upstream branch 4 times, most recently from 5214156 to 0e0efea Compare May 12, 2022 15:23
@CLAassistant
Copy link

CLAassistant commented May 12, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@pascalwengerter pascalwengerter left a 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)
Copy link
Contributor

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
Copy link
Contributor

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

@pascalwengerter
Copy link
Contributor

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 runningOnEos or buildForEos are more applicable than isEos or just eos?

@javfg javfg force-pushed the fix-sidebar-links-upstream branch 4 times, most recently from a3d337e to 0ef9042 Compare May 16, 2022 12:52
@javfg
Copy link
Contributor Author

javfg commented May 16, 2022

All suggestions added! I changed eos to runningOnEos, the first of the options you proposed.

@javfg javfg marked this pull request as ready for review May 16, 2022 14:08
@javfg javfg requested a review from fschade as a code owner May 16, 2022 14:08
Copy link
Contributor

@pascalwengerter pascalwengerter left a 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">
Copy link
Contributor

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">
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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" />
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor Author

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:

image

I assume there is no reason to have text there, but correct me if I'm wrong (pinging @diocas).

Copy link
Contributor

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" />
Copy link
Contributor

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

Copy link
Contributor Author

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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

diocas and others added 4 commits May 17, 2022 13:11
Co-authored-by: elizavetaRa <svillyfly@mail.ru>
Co-authored-by: Javier Ferrer <javier.ferrer@cern.ch>
@javfg javfg force-pushed the fix-sidebar-links-upstream branch from 0ef9042 to 07f166f Compare May 17, 2022 11:21
@javfg
Copy link
Contributor Author

javfg commented May 17, 2022

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!

@sonarcloud
Copy link

sonarcloud bot commented May 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

73.4% 73.4% Coverage
0.0% 0.0% Duplication

configuration: function () {
return {
options: {
runningOnEos: true
Copy link
Contributor

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

@pascalwengerter pascalwengerter changed the base branch from master to port-eos-details-in-sidebar May 17, 2022 16:11
Copy link
Contributor

@pascalwengerter pascalwengerter left a 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

@pascalwengerter pascalwengerter merged commit be4a5e1 into owncloud:port-eos-details-in-sidebar May 17, 2022
pascalwengerter pushed a commit that referenced this pull request May 18, 2022
* 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>
ownclouders pushed a commit that referenced this pull request May 18, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break long words
4 participants