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

feat: Add UI elements to modify navigation display #1295

Merged
merged 18 commits into from
Jan 9, 2025

Conversation

enjeck
Copy link
Contributor

@enjeck enjeck commented Aug 16, 2024

Part of #1177 and #1193

Todo

  • ensure it works when you update a context
  • ensure it works for owners and recipients too
  • Discuss the UI and copy
  • Ensure self-shares to the owner are deleted when share is deleted

@enjeck enjeck self-assigned this Aug 16, 2024
lib/Service/ShareService.php Outdated Show resolved Hide resolved
@enjeck

This comment was marked as outdated.

jancborchardt

This comment was marked as resolved.

@enjeck

This comment was marked as outdated.

@juliusknorr juliusknorr added enhancement New feature or request 2. developing Work in progress labels Aug 29, 2024
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch from ac42f69 to ccf873b Compare September 4, 2024 08:26
@enjeck enjeck force-pushed the nav-display-frontend branch from e0b033f to 215ca74 Compare September 4, 2024 08:29
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch from ccf873b to 8075a22 Compare September 19, 2024 09:51
@enjeck enjeck force-pushed the nav-display-frontend branch from 52553e6 to 37e8272 Compare September 19, 2024 09:59
@enjeck

This comment was marked as outdated.

@enjeck enjeck marked this pull request as ready for review October 3, 2024 08:21
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch 2 times, most recently from 0edd48a to cd00c05 Compare October 30, 2024 07:33
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch from cd00c05 to bc6ae95 Compare November 19, 2024 07:08
@enjeck enjeck requested a review from blizzz as a code owner November 19, 2024 07:08
@enjeck enjeck force-pushed the nav-display-frontend branch from 4986b0f to 0e62738 Compare November 20, 2024 05:41
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch from 99b8922 to 40a2485 Compare November 27, 2024 09:14
@enjeck enjeck force-pushed the nav-display-frontend branch from 2f01848 to 93126f1 Compare December 13, 2024 16:29
@enjeck enjeck force-pushed the enh/1177/enable-nav-display-logic branch from 40a2485 to c144b4e Compare December 16, 2024 06:25
@enjeck enjeck force-pushed the nav-display-frontend branch 2 times, most recently from e863887 to ab66fcc Compare December 16, 2024 06:38
@enjeck
Copy link
Contributor Author

enjeck commented Dec 16, 2024

Okay. Took a long time, but this finally works (from my tests). If others confirm, we should be good to merge it (after adding tests).

UI looks like this: @jancborchardt

Screenshot from 2024-12-16 07-39-09
Screenshot from 2024-12-16 07-39-49

@blizzz
Copy link
Member

blizzz commented Dec 16, 2024

One little thing needed: with switching away from the three modes to just two modes, we also have to remove this condition:

// an owner (no explicit check necessary): requires ALL
$qb->expr()->eq('n.display_mode', $qb->createNamedParameter(Application::NAV_ENTRY_MODE_ALL, IQueryBuilder::PARAM_INT)),

Otherwise a share owner cannot remove the entry for themselves. Works fine then!

In the backend, we should remove the third option, now that is is unnecessary.

src/shared/constants.js Outdated Show resolved Hide resolved
enjeck and others added 15 commits January 4, 2025 15:16
Signed-off-by: Cleopatra Enjeck M <[email protected]>
- removed to only fetch the one share that matches the user id. Group
  shares my be present and only those relevant to the current user are
  being fetched.
- setting the override now against any share. There might be more and some
  might be dropped – the override is working against any of them
- one none-hidden setting wins
- dropped using the NAV_ENTRY_MODE_RECIPIENTS as it is not needed anymore

Signed-off-by: Arthur Schiwon <[email protected]>
@enjeck enjeck force-pushed the nav-display-frontend branch from e0a2cd8 to 1e0c152 Compare January 4, 2025 19:26
Signed-off-by: Cleopatra Enjeck M. <[email protected]>
@enjeck enjeck force-pushed the nav-display-frontend branch from 1e0c152 to 30748c4 Compare January 4, 2025 19:59
this can be removed once >=NC31 is supported and our NavigationController
is adjusted

Signed-off-by: Arthur Schiwon <[email protected]>
@@ -42,6 +42,14 @@
</div>
<NcContextResource :resources.sync="resources" :receivers.sync="receivers" />
</div>
<div class="row space-T">
<NcActionCheckbox :checked="showInNavigationDefault" @change="updateDisplayMode">
Show in app list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be translatable

Show in app list
</NcActionCheckbox>
<p class="nav-display-subtext">
This can be overridden by a per-account preference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be translatable


<div class="row space-T">
<NcActionCheckbox :checked="showInNavigationDefault" @change="updateDisplayMode">
Show in app list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be translatable

Show in app list
</NcActionCheckbox>
<p class="nav-display-subtext">
This can be overridden by a per-account preference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be translatable

<template #icon>
<Delete :size="20" />
</template>
{{ t('tables', 'Delete application') }}
</NcActionButton>
<NcActionCheckbox :checked="showInNavigation" @change="updateDisplayMode">
Show in app list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be translatable

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpicks, but otherwise looks good 👍

Signed-off-by: Julius Knorr <[email protected]>
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works. Also reviewed the backend bits of the base PR.

@blizzz blizzz merged commit 76b51d8 into enh/1177/enable-nav-display-logic Jan 9, 2025
58 checks passed
@blizzz blizzz deleted the nav-display-frontend branch January 9, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

4 participants