-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Share redesign split into internal external sections #49653
Share redesign split into internal external sections #49653
Conversation
Primarily to move it out of the way for changes in the source location. The feature was deprecated in version 25 (nextcloud#28320), five versions ago. Refs: nextcloud#48925
According to screen designs. * Elements and lists reordered * Headlines and separators introduced Intermediate step: components need to be dissolved in the following commits. Refs: nextcloud#48925
…are section Allow share creation in the newly differentiated share section. Intermediate change: to preserve functionality; this needs to be differentiated with the next commits. Refs: nextcloud#48925
4c9ad79
to
aa8bd5e
Compare
…ringTab According to nextcloud#48925 screen designs we've to split this into 1. Link (creation) and 2. List (of created share links) Intermediate step. Refs: nextcloud#48925
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.
A few comments after a quick glance.
Please include before and after screenshots in the PR description for @nextcloud/designers
Before | After |
---|---|
shot b4 | shot after |
<!-- will move _into_ the dropdown component --> | ||
<div style="border-top: 1px dotted grey;"></div> | ||
|
||
<!-- internal link copy --> | ||
<SharingEntryInternal :file-info="fileInfo" /> | ||
|
||
<div style="border-top: 1px dotted grey;"></div> | ||
<!-- will move _into_ the dropdown component --> |
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.
<!-- will move _into_ the dropdown component --> | |
<div style="border-top: 1px dotted grey;"></div> | |
<!-- internal link copy --> | |
<SharingEntryInternal :file-info="fileInfo" /> | |
<div style="border-top: 1px dotted grey;"></div> | |
<!-- will move _into_ the dropdown component --> | |
<!-- will move _into_ the dropdown component --> | |
<div class"divider"></div> | |
<!-- internal link copy --> | |
<SharingEntryInternal :file-info="fileInfo" /> | |
<div class"divider"></div> | |
<!-- will move _into_ the dropdown component --> |
So we should avoid inline styling, even if we plan to move into component.
@add:share="addShare" /> | ||
<!-- ***** DISSOLVED OUT FROM ShareLinkList ***** --> | ||
|
||
<!-- TODO: component must either be configurable or diffentiated into two --> |
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 component serves both uses cases now, so it should be configurable via props
@@ -142,6 +192,7 @@ export default { | |||
showSharingDetailsView: false, | |||
shareDetailsData: {}, | |||
returnFocusElement: null, | |||
canLinkShare: getCapabilities().files_sharing.public.enabled, |
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.
Following from above....
canLinkShare: getCapabilities().files_sharing.public.enabled, |
The information is already in this.config.isPublicShareAllowed
or config.isPublicShareAllowed
for the template
@@ -105,11 +149,15 @@ import SharingInherited from './SharingInherited.vue' | |||
import SharingLinkList from './SharingLinkList.vue' | |||
import SharingList from './SharingList.vue' | |||
import SharingDetailsTab from './SharingDetailsTab.vue' | |||
import { getCapabilities } from '@nextcloud/capabilities' |
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.
import { getCapabilities } from '@nextcloud/capabilities' |
See : apps/files_sharing/src/services/ConfigService.ts
It is available in the data object as config: new Config(),
…endations() out I like to reach the goals, but the new state show's how entangled the code is. Let's me think about this change - I might park or drop this commit. Otherwise: let's discuss. == Goal * Make suggestion/recommendation code reusable * Have it as separate module * to reduce LOC of SharingInput * to make the extracted function easier testable == Notable changes Apart from obvious moving code: 1. this.externalResults is actually OCA.Sharing.ShareSearch.state.results This is now directly referenced. 2. the "lookup" parameter to getSuggestions() was never passed and internally defaulted The parameter was therefor removed. == Findings This reveals a bit of a mess: 1. the filter function depends heavily on the Vue context 2. the formatting of API results for UI display is mixed with combining data 3. external results (OCA.Sharing.ShareSearch.state) are already formatted == Refactoring left-overs 1. existingSharesFilter() depends on reshare, linkShares, shares from the Vue object I'd like to keep this function independant from Vue actually, but stop here to not go deeper into a refactoring rabbit hole. Marked as TODO. 2. Separation of data fetching and data combining from formatting.
aa8bd5e
to
0a9c37a
Compare
This reverts commit a9507ea.
…etRecommendations() out" The attempted refactoring helped understanding the dependencies, but is partly the wrong direction. The formatter functions should be moved out, the recommendations and suggestion functions however, ould need to be differentiated in too many details that duplicating small aspects of code would be better than having too many conditions. This reverts commit 642d623.
…nk into SharingTab' -- Fix broken dissolve
shareWith is below used _trimmed_ to index the field of the shareWith-to-type mapping; thus, create the key trimmed too. Why trimming is done here is questionable though. Refs: nextcloud#48925 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
flat() is speaking Support is good: https://caniuse.com/array-flat Refs: nextcloud#48925 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Encapsulate the share type differntiation/grouping in one module. Refs: nextcloud#48925 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
…aringInput Code copied from SharingInput.vue Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Inspired (initially copied) from SearchInput, implemented to search only for external (remote) sharees. WIP: changes and further TODOs mentioned in the comments at the beginning of the file Refs: nextcloud#48925 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Replace >SearchInput> by <ExternalShareeSearch>, which is implemented more specifically to search for external sharees Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Change SharingInput to search for internal share types only. * Lookup was removed because we don't want to lookup users for internal shares * The global lookup entry is no longer added to the end of the list for the same reason * Share types are limited to internal shares * Placeholder texts are adapted Refs: nextcloud#48925 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
0a9c37a
to
01ec6d0
Compare
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Thanks for getting this started! As discussed, Nextcloud will now take over this PR. Since it's from an external branch, I’m closing it and have created a new PR based on an internal branch: nextcloud/server#49653 |
Work in progress (WIP)
Summary
Splitting shares into two sections: internal shares and external shares.
TODO
<SharingInput>
(new component or making it configurable)Checklist