Skip to content

Add OCA.Files.Sidebar and migrate sharing - #15719

Merged
skjnldsv merged 14 commits into
masterfrom
enhancement/sidebar/standard
Oct 29, 2019
Merged

Add OCA.Files.Sidebar and migrate sharing#15719
skjnldsv merged 14 commits into
masterfrom
enhancement/sidebar/standard

Conversation

@skjnldsv

@skjnldsvskjnldsv commented May 24, 2019

Copy link
Copy Markdown
Member

If anyone have specific questions about part of a code, feel free to ask me on talk directly!


Todo

Bugs

  • Tooltip arrow needs a fix (position is calculated but our css is not allowing that)
    Capture d’écran_2019-07-11_16-59-23
  • Clipboard status tooltip not showing on the ActionLink (share link and internal link), this is because of the Actions component v-tooltip that conflicts. Asked the dev about it: https://twitter.com/skjnldsv/status/1149206297923002369. Removing the v-tooltip from Actions works. Other solution would be to force the tooltip to be shown and use the ActionLink default text slot to display the status. But clicking it focus on on another element than the action (fake element for the clipboard library) and therefore make the hover state change and the tooltip disappear.
  • Firefox refuse the auto copy for security since the call is not direct (share link creation, then use the mounted function. We should find another way to call it.
  • Datepicker can probably prevent picking a date before the current day
  • Weird ui when password is on by default (not enforced) and date is enforced. We have the popover to ask for an expire date, and a default password is generated on the background. So when you submit the share creation, it's being generated with a password that the user does not know yet!

APIs

Register new tab

<template>
<Tab :icon="icon" :name="name" :class="{ 'icon-loading': loading }">
<!-- Whatever in the tab -->
</Tab>
</template>
<script>importTabfrom'nextcloud-vue/dist/Components/AppSidebarTab'exportdefault {	name:'SharingTab',	components: { Tab	},	props: {// fileInfo will be given by the Sidebar fileInfo: { type:Object,default: () => {}, required:true }	},data() {return { icon:'icon-share', loading:true, name:t('files_sharing', 'Sharing') }	},	computed: {/** * Needed to differenciate the tabs * pulled from the AppSidebarTab component *  * @returns{string}*/id() {returnthis.name.toLowerCase().replace(//g, '-') },/** * Returns the current active tab * needed because AppSidebarTab also uses $parent.activeTab * * @returns{string}*/activeTab() {returnthis.$parent.activeTab }	}}</script>
importSharingTabfrom'./views/SharingTab'window.addEventListener('DOMContentLoaded',()=>{if(OCA.Files&&OCA.Files.Sidebar){OCA.Files.Sidebar.registerTab(newOCA.Files.Sidebar.Tab('sharing',SharingTab))}})

Register new external link action in shares link menu (social sharing)

window.addEventListener('DOMContentLoaded',()=>{if(OCA.Sharing&&OCA.Sharing.ExternalLinkActions){OCA.Sharing.ExternalLinkActions.registerAction({url: link=>`https://share.diasporafoundation.org/?url=${link}`,name: t('socialsharing_facebook','Share to Diaspora'),icon: 'icon-social-diaspora'});}});

Registering a new section in the sharing tab

OCA.Sharing.ShareTabSections.registerSection((el,fileInfo)=>{if(fileInfo.mountType!=='group'){return}returnMyVueComponent})

@skjnldsvskjnldsv added this to the Nextcloud 17 milestone May 24, 2019
@skjnldsvskjnldsv self-assigned this May 24, 2019
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch from ac5f979 to e01c8bcCompareMay 29, 2019 16:19
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch from e01c8bc to 32fc618CompareJune 7, 2019 13:31
@skjnldsv

This comment has been minimized.

@juliusknorr

This comment has been minimized.

@skjnldsv

This comment has been minimized.

Comment threadapps/files/src/services/FileInfo.js
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch 2 times, most recently from e1caa22 to d84baf4CompareJuly 8, 2019 16:27
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch 3 times, most recently from 7b7239c to 87480c0CompareJuly 12, 2019 19:00
@MorrisJobkeMorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch 4 times, most recently from 9cf8980 to e45019fCompareJuly 28, 2019 08:53
@skjnldsv
skjnldsvforce-pushed the enhancement/sidebar/standard branch from 3bcc7b6 to 4241a55CompareAugust 8, 2019 17:22
@skjnldsv

Copy link
Copy Markdown
MemberAuthor

History was made! :D
Capture d’écran_2019-10-29_14-48-25
Capture d’écran_2019-10-29_14-53-16

@jancborchardt

Copy link
Copy Markdown
Member

where were you when sidebar was merge

@skjnldsvskjnldsv mentioned this pull request Mar 18, 2020
4 tasks
Sign up for freeto 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.

8 participants

@skjnldsv@juliusknorr@ChristophWurst@danxuliu@rullzer@jancborchardt@georgehrke@kesselb