Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented Dec 10, 2024

This commit makes several UX improvements along with code cleanup
for the new AI usage page:

  • Ensure all text uses I18n
  • Change from usage to
  • Use in place of custom card styles
  • Format numbers nicely using our number format helper,
    show full values on hover using title attr
  • Add empty data placeholders in each card
  • Move the users list below the per feature/per model cards,
    and split it into 2 columns when there are > 25 users
  • Add subheader for usage page with "Learn more..." link

Also, it improves the load experience of the page. Previously
we loaded all the report data up front on the server when the
admin visited this usage route which caused a white screen
in some cases and could take quite long.

Now, we show loading spinners for the report and cards below
while we fetch the data.

image
image

Note, the users list still needs more work, a reusable avatar + username component
from core. It's an improvement from what it was before, where it pushed the
other stat card down the page because 50 users were shown.

Empty data

image

Mobile

* Ensure all text uses I18n
* Change from <button> usage to <DButton>
* Use <AdminConfigAreaCard> in place of custom card styles
* Format numbers nicely using our number format helper,
  show full values on hover using title attr
* Ensure 0 is always shown for counters, instead of being blank
@martin-brennan martin-brennan force-pushed the issue/cleanup-usage-page branch 3 times, most recently from 4fca0b8 to afdd13b Compare December 11, 2024 03:16
Use ConditionalLoadingSpinner to hide load of usage
data, this prevents us hanging on page load with a white
screen.
@martin-brennan martin-brennan force-pushed the issue/cleanup-usage-page branch from afdd13b to 13c3481 Compare December 11, 2024 03:19
@martin-brennan martin-brennan marked this pull request as ready for review December 11, 2024 04:41
@martin-brennan martin-brennan force-pushed the issue/cleanup-usage-page branch from d12b8cb to 13b7576 Compare December 11, 2024 05:04
@SamSaffron SamSaffron merged commit ae80494 into main Dec 11, 2024
6 checks passed
@SamSaffron SamSaffron deleted the issue/cleanup-usage-page branch December 11, 2024 21:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants