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

Add "View as" button to Rill Cloud dashboards #3047

Merged
merged 44 commits into from
Sep 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
270e030
Refactor `UserButton`
ericpgreen2 Sep 1, 2023
0d6b7ef
Add conditional 'View as' menu item
ericpgreen2 Sep 1, 2023
2354e53
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 6, 2023
9831e18
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 6, 2023
349b418
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 6, 2023
5bec5aa
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 7, 2023
aac65ad
Add `svelte-headlessui` and `svelte-popperjs`
ericpgreen2 Sep 8, 2023
770d813
Add "View As" popover
ericpgreen2 Sep 8, 2023
e136526
Acquire and set JWT
ericpgreen2 Sep 8, 2023
e07810f
Remove calls to `ListFiles` API
ericpgreen2 Sep 9, 2023
d5c1d26
Fix `svelte-check` w/ explicit type
ericpgreen2 Sep 11, 2023
d37bd4f
Add comment
ericpgreen2 Sep 11, 2023
ca4cc58
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 11, 2023
e282ec4
Patch `MenuItem` component
ericpgreen2 Sep 11, 2023
37e03d7
Remove File API usage
ericpgreen2 Sep 11, 2023
941248c
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 12, 2023
d74f876
Handle chip removal
ericpgreen2 Sep 12, 2023
c0b9051
Fix z-index on chip
ericpgreen2 Sep 12, 2023
b839ef4
Clear error when switching users
ericpgreen2 Sep 12, 2023
1b66017
Switch back to admin's JWT
ericpgreen2 Sep 12, 2023
adda499
Handle 404 from `GetCatalog`
ericpgreen2 Sep 12, 2023
e326883
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 12, 2023
7ee9b93
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 12, 2023
742e663
Add workaround for metrics view 401s; clean up
ericpgreen2 Sep 12, 2023
8ac38ef
Clear mimicked user after navigation
ericpgreen2 Sep 12, 2023
1063b9c
Bugfix
ericpgreen2 Sep 12, 2023
3056801
Make the whole chip clickable
ericpgreen2 Sep 12, 2023
3abb9bb
Add checkmark to denote active user
ericpgreen2 Sep 12, 2023
046796c
Remove comment
ericpgreen2 Sep 13, 2023
57ab726
Edit 404 copy
ericpgreen2 Sep 13, 2023
88a69f3
Better variable names
ericpgreen2 Sep 13, 2023
8ec4ee6
Merge branch 'main' into cloud-ui-remove-file-api
ericpgreen2 Sep 13, 2023
9475286
Merge branch 'cloud-ui-remove-file-api' into partner-dashboards-rill-…
ericpgreen2 Sep 13, 2023
0126cbe
Move code to `features/view-as-user`
ericpgreen2 Sep 13, 2023
ff4c407
Factor out a `ViewAsUserMenuItem` component
ericpgreen2 Sep 13, 2023
be82da5
Use consistent "viewed as" terminology
ericpgreen2 Sep 13, 2023
543bf3b
Use consistent "view as" terminology (cont.)
ericpgreen2 Sep 13, 2023
c50735f
Clean up actions
ericpgreen2 Sep 13, 2023
b8a9bb8
Nits
ericpgreen2 Sep 13, 2023
cdbadd9
Bug fix
ericpgreen2 Sep 13, 2023
0891f61
Use query cache
ericpgreen2 Sep 13, 2023
a4e72ae
Remove unneccessary query observer
ericpgreen2 Sep 13, 2023
302d95b
Handle case when admin's JWT gets refreshed
ericpgreen2 Sep 13, 2023
e24d6ab
Merge branch 'main' into partner-dashboards-rill-cloud-ux
ericpgreen2 Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add checkmark to denote active user
  • Loading branch information
ericpgreen2 committed Sep 12, 2023
commit 3abb9bb8f568373b6852b9f98b3d29a0cb3807ef
10 changes: 10 additions & 0 deletions web-admin/src/components/authentication/ViewAsUserPopover.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import Check from "@rilldata/web-common/components/icons/Check.svelte";
import Spacer from "@rilldata/web-common/components/icons/Spacer.svelte";
import { Menu, MenuItem } from "@rilldata/web-common/components/menu";
import { Search } from "@rilldata/web-common/components/search";
import { updateMimickedJWT } from "@rilldata/web-common/features/dashboards/granular-access-policies/updateMimickedJWT";
Expand Down Expand Up @@ -71,10 +73,18 @@
<div class="overflow-auto pb-1">
{#each visibleUsers as user}
<MenuItem
icon
animateSelect={false}
focusOnMount={false}
on:select={() => viewAsUser(user)}
>
<svelte:fragment slot="icon">
{#if user === $viewAsUserStore}
<Check size="20px" color="#15141A" />
{:else}
<Spacer size="20px" />
{/if}
</svelte:fragment>
{user.email}
</MenuItem>
{/each}
Expand Down