-
Notifications
You must be signed in to change notification settings - Fork 510
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
Load More
button is visible when there are no more data to load on the Audit Logs page
#2390
Comments
/assign |
This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest |
I guess this is an issue of |
What should happen when there are new audit logs created since they last refreshed though? When they refreshed, there were no additional ones, but after a few seconds for example there could be new ones |
@chronark these are really good points! My thoughts on how we can approach this: Option 1: Polling for New Logs Option 2: Loading State Option 3: Loading State (simple) |
we should coordinate this with what @ogzhanolguncu is working on for our /logs page, the experience should be the same for the end user the logs page will have a "live" mode, where we do background polling via react-query, I guess we should do the same here so I guess a combination of (1) + (2) would be nice |
/logs page is not quite ready, but here is what we have there right now. Initial data is fetched from RSC, then passed to a client component, then react-query kicks in and checks and refreshes regularly every 2 seconds. We can easily turn this into a 'Load more' button and let users fetch the data at their will. This is the most intuitive solution that came to my mind, and I'm open to suggestions. |
@ogzhanolguncu sounds good to me 👍 the main issue on this page rn is lack of feedback for a user.
yep, and show a message if no new logs are found. |
Yeah, once we are done with |
lol. either I'm missing something or the bug is actually much bigger than I initially thought 😅 It's not really about the <div className="w-full mt-8">
<Link href={buildHref({ before: logs.at(-1)?.time })} prefetch>
<Button
size="block"
disabled={!hasMoreLogs}
variant={hasMoreLogs ? "secondary" : "disabled"}
>
{hasMoreLogs ? "Load more" : "No more logs"}
</Button>
</Link>
</div> Apparently, indicating that no more logs are available for loading has been supported for months. I dig dipper and found that this page does not work as it might be expected for several reasons:
Here is a link to the file: Given this, a temporary fix may not be sufficient. It likely needs a full re-examination and rewrite, potentially from scratch, ideally following the new design standards used on the |
Preliminary Checks
I have reviewed the documentation: https://unkey.com/docs
I have searched for existing issues: https://github.com/unkeyed/unkey/issues
This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.
Reproduction / Replay Link (Optional)
No response
Issue Summary
On the Audit Logs page, the
Load More
button is displayed even when all available log entries have already been loaded. This can cause confusion for users, as clicking the button does not load any additional data, suggesting there might be more logs when there aren't any.Steps to Reproduce
Expected behavior
Once all available audit logs have been loaded, the
Load More
button should disappear or be disabled, indicating to the user that no more logs are available for loading.Other information
No response
Screenshots
No response
Version info
The text was updated successfully, but these errors were encountered: