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

Public URLs Table UI #5366

Merged
merged 85 commits into from
Sep 19, 2024
Merged

Public URLs Table UI #5366

merged 85 commits into from
Sep 19, 2024

Conversation

lovincyrus
Copy link
Contributor

@lovincyrus lovincyrus commented Aug 1, 2024

Closes #5328

This PR adds a new public URLs table to the project settings page.

Ability to edit name to the public URL creation
CleanShot 2024-09-11 at 14 12 04@2x

Support title in magic auth token to display Public URL name in the management table
34b4171

export interface V1MagicAuthToken {
  id?: string;
  projectId?: string;
  url?: string;
  token?: string;
  createdOn?: string;
  expiresOn?: string;
  usedOn?: string;
  createdByUserId?: string;
  createdByUserEmail?: string;
  attributes?: V1MagicAuthTokenAttributes;
  metricsView?: string;
  metricsViewFilter?: V1Expression;
  metricsViewFields?: string[];
  state?: string;
+ title?: string;
}

CleanShot 2024-09-11 at 17 30 06@2x

@lovincyrus lovincyrus changed the title Public URLs Table UI [Blocked] Public URLs Table UI Aug 1, 2024
@lovincyrus lovincyrus force-pushed the cyrus/public-urls-table branch 2 times, most recently from 0608089 to 33c0e72 Compare August 5, 2024 19:49
@lovincyrus lovincyrus force-pushed the cyrus/public-urls-table branch 2 times, most recently from db70fae to f2a8d00 Compare August 16, 2024 19:16
@lovincyrus lovincyrus changed the title [Blocked] Public URLs Table UI Public URLs Table UI Sep 4, 2024
@begelundmuller
Copy link
Contributor

begelundmuller commented Sep 10, 2024

@lovincyrus This PR has now added support for accessing the full URLs of previously created shareable URLs: #5621. You can access the URLs in the url property in the objects returned from the ListMagicAuthTokensRequest RPC.

One thing to be aware of – the url will only be available for newly created shareable URLs, not for ones created before this PR. So the UI will need to handle that case gracefully.

@lovincyrus
Copy link
Contributor Author

Demo:

CleanShot.2024-09-10.at.09.44.13.mp4

@lovincyrus
Copy link
Contributor Author

lovincyrus commented Sep 10, 2024

the url will only be available for newly created shareable URLs, not for ones created before this PR. So the UI will need to handle that case gracefully.

Sanity check, @jkhwu - since this is a fairly new feature, I think it's okay to say that we don't need to handle the case for the previously created public URLs. If we do want to handle the case, here's what the empty case looks like:

CleanShot 2024-09-10 at 10 16 52@2x

Update 1: I realized To create a public URL, click the Share button. can be misleading in the context of project settings.
Update 2: Updated the copy

CleanShot 2024-09-10 at 10 23 13@2x

@lovincyrus lovincyrus marked this pull request as ready for review September 10, 2024 17:19
@jkhwu
Copy link
Contributor

jkhwu commented Sep 10, 2024

Watched the demo and it looks good to me @lovincyrus . The empty state that you proposed looks fine to me, good copy decisions.

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

UXQA –

  • I have a table of previously-created Public URLs. It's confusing that the row has a "pointer" cursor, yet clicking on the row does nothing. See Jam.
  • We should use the dashboard title, if one exists, else fallback to the name
  • It's unclear to me how these URLs are sorted. After creating a URL, I wasn't sure where I'd find it in the list. (CC @jkhwu)
    image
  • I deleted a bunch of URLs, then the "Public URL deleted" notification hung on the screen:
    image
  • When there are more than 20 URLs, the table doesn't offer pagination or somehow indicate that there more results not shown. (CC @jkhwu)
  • It'd be nice if we could use an <a> tag to navigate the URL, so that on:hover the browser shows the URL in the bottom-left corner. Rather than the whole row being clickable, I wonder if we should have a column with a button that says "Copy URL". (CC @jkhwu)

@lovincyrus
Copy link
Contributor Author

Tagging @begelundmuller and @pjain1 for a review - I've added title support to the magic auth token for displaying the Public URL name in the management table. Ref: 34b4171

export interface V1MagicAuthToken {
  id?: string;
  projectId?: string;
  url?: string;
  token?: string;
  createdOn?: string;
  expiresOn?: string;
  usedOn?: string;
  createdByUserId?: string;
  createdByUserEmail?: string;
  attributes?: V1MagicAuthTokenAttributes;
  metricsView?: string;
  metricsViewFilter?: V1Expression;
  metricsViewFields?: string[];
  state?: string;
+ title?: string;
}

Originally, I added title for the dashboard title, but after discussions with Janet and Eric O, we also need an additional column for 'Public URL name'.

Should I instead add two more fields to support those requirements?

export interface V1MagicAuthToken {
  id?: string;
  projectId?: string;
  url?: string;
  token?: string;
  createdOn?: string;
  expiresOn?: string;
  usedOn?: string;
  createdByUserId?: string;
  createdByUserEmail?: string;
  attributes?: V1MagicAuthTokenAttributes;
  metricsView?: string;
  metricsViewFilter?: V1Expression;
  metricsViewFields?: string[];
  state?: string;
+ urlName?: string;
+ dashboardName?: string;
}

CleanShot 2024-09-11 at 17 52 49@2x

@begelundmuller
Copy link
Contributor

The changes here look good to me. About this:

Originally, I added title for the dashboard title, but after discussions with Janet and Eric O, we also need an additional column for 'Public URL name'.

Should I instead add two more fields to support those requirements?

It makes sense to give the public URL a name, but I don't think we should add extra fields for capturing the dashboard title. It may be edited and would get out of sync.

You can either do a separate request at render time to get the dashboard title (slow for large lists), or would have to limit to showing just the public URL title and dashboard name.

@begelundmuller begelundmuller removed the request for review from k-anshul September 12, 2024 08:48
@lovincyrus
Copy link
Contributor Author

lovincyrus commented Sep 12, 2024

Latest demo:

I've added a forward cursor-based paginated table to display the public URLs. As you can see, we only have a next button. That is because we only get nextPageToken in the API response.

Here is the figma mock for reference: https://www.figma.com/design/Qt6EyotCBS3V6O31jVhMQ7/RILL?node-id=15019-622855&node-type=frame&t=YcDxSNiwCIjVJkiZ-0

CleanShot.2024-09-12.at.10.28.30.mp4

@lovincyrus
Copy link
Contributor Author

@ericpgreen2 Please report any anomalies if you find any in the previously generated public URLs.

@ericpgreen2
Copy link
Contributor

@ericpgreen2 Please report any anomalies if you find any in the previously generated public URLs.

Here are what the previously-created URLs look like:
image

No anomalies per se, but there's no an obvious link available to click. I supposed I was envisioning an explicit "Copy link" button being in-line, not hidden behind a dropdown menu.

@lovincyrus
Copy link
Contributor Author

@ericpgreen2 Please report any anomalies if you find any in the previously generated public URLs.

Here are what the previously-created URLs look like: image

No anomalies per se, but there's no an obvious link available to click. I supposed I was envisioning an explicit "Copy link" button being in-line, not hidden behind a dropdown menu.

Sweet! I've hidden the ability to copy URL based on the availability of the constructed url. The previously created public urls will have undefined url, as per #5366 (comment).

Quick note - if url is available, the public url name cell will be clickable and there is a Copy menu item in the actions dropdown.

Re: "not hidden behind a dropdown menu." — I've already synced with @jkhwu and @ericokuma extensively on the consistency of actions ui in our table components. We will use 3 dots icon in the public URL management table.

@lovincyrus
Copy link
Contributor Author

Makes sense. I was going to switch to infinite scrolling anyway. Hmm, this PR would definitely benefit from an endpoint that allows createInfiniteQuery (I'll explore this) and a server-side sortBy, sortOrder, and query. @begelundmuller

Yeah that should be possible, there's some good inspiration for that in the Google API style guide as well:

Is this high priority? It's not a quick change (probably a day or so of effort).

Not a high priority. For context, I would say these features will be needed in the project settings subpages (public URLs, environment variables, user management, etc.) as we expand our coverage for table component.

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

This is great! Nice work 🙌

@lovincyrus lovincyrus merged commit ca3fc8b into main Sep 19, 2024
10 checks passed
@lovincyrus lovincyrus deleted the cyrus/public-urls-table branch September 19, 2024 23:23
@ericokuma
Copy link

Looks great, good work here @lovincyrus !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public URLs: Add a page to list/manage
5 participants