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 dataset tab instead of dropdown #627

Merged
merged 20 commits into from Mar 20, 2024
Merged

Add dataset tab instead of dropdown #627

merged 20 commits into from Mar 20, 2024

Conversation

barryvdh
Copy link
Collaborator

@barryvdh barryvdh commented Mar 18, 2024

Current dropdown has the following issues:

  • closes when updates (eg if a dataset is added before choosing)
  • Limited info
  • Can get long

So the idea is this:

  • Create a new tab for datasets, instead of de dropdown
  • Show more data on the tabs
  • Maybe add some advanced controls, like pausing the auto-refresh (often requested), filtering requests (like open handler) or maybe show some badge indicators (number of queries, mails sent) to jump to that tab directly.

Rough prototype in PR:
image

Thoughts:

  • Maybe separate into new widget file
  • Table based would be better instead of dd/dt
  • Configurable?

@barryvdh
Copy link
Collaborator Author

barryvdh commented Mar 19, 2024

Table example, which only renders the row once:
image

@barryvdh
Copy link
Collaborator Author

@erikn69 @parallels999 any thoughts about this approach?

@erikn69
Copy link
Contributor

erikn69 commented Mar 19, 2024

It seems fine to me, but it wouldn't be better if the new calls were placed at the beginning, i mean, sorted descendingly(avoid scrolling for the new ones)
image
One question, some routes use GET and have the query parameters in the url, are those parameters removed from the URL? Or will they be separated and converted to some array(better readability, url decoded)? I always found them annoying, sometimes they grew too big
image

@barryvdh
Copy link
Collaborator Author

Yeah sorting could be changed but if newer are on top, the list keeps changing while you are browsing it. Maybe we could just toggle it when you click on the header.

Right now it shows the uri value from the meta data. It might be possible to show a bit more description, eg. for livewire a component or something, but not sure what the best way it.

@erikn69
Copy link
Contributor

erikn69 commented Mar 19, 2024

I mean this, some JS ajax components use GET calls, maybe decodeURIComponent could be used for readability
image
and could be split as another column, PARAMS

@barryvdh
Copy link
Collaborator Author

Not really sure what's best. For now I've added overflow so it's 1 line, and a filter to clear the entries so far + filter on uri and method:
image

@barryvdh
Copy link
Collaborator Author

image

And with autoshow toggle. Maybe we should store it in sessionstorage or something though.

@parallels999
Copy link
Contributor

parallels999 commented Mar 19, 2024

How would you know which one is selected and active?

Before I saw it in the number and as active item, always visible
image
Looks easy to confuse with the open modal
image

@barryvdh
Copy link
Collaborator Author

That is a good question. But we could still show the name in the tab on the right, just like the dropdown

@parallels999
Copy link
Contributor

With dropdown is easier to compare a tab data between requests, with a specific tab you would have to go to the tab, select the request you are looking for and return to the tab with the data

@barryvdh
Copy link
Collaborator Author

barryvdh commented Mar 19, 2024

Something like this, but we need to restrict the width
image

Also highlighting the active dataset + showing the badges > 0, with direct clicks to the dataset.

@parallels999
Copy link
Contributor

parallels999 commented Mar 19, 2024

Looks better, but if i want to look #37?
I think the number should also be in the table.
When there are many ajax calls, sometimes i remember the number of the one that interests me the most to see it later, I wouldn't like to have to count them to search for #37


Also, How to know if the calls are ajax or normal calls, previously even the calls coming from the iframe have a label

@barryvdh
Copy link
Collaborator Author

The switching to same tab is a valid point, but mostly handled by the badges, which direct you to the correct tab.

I added the suffix to the tab label, but I think almost always the requests are ajax, except for the first one? (or maybe the first 2 in case of a redirect).
I guess we could add a 'source' label the the table though.

An alternative could be a popup like the open handler, but I kinda like that you can see the incoming requests. (But that add the question again if the order might be reversed)

@parallels999
Copy link
Contributor

parallels999 commented Mar 19, 2024

I added the suffix to the tab label, but I think almost always the requests are ajax, except for the first one?

Are Iframes considered ajax?

but I kinda like that you can see the incoming requests. (But that add the question again if the order might be reversed)

To me, yes, But for many people that part is confusing.
They always need to be explained that they are new calls that are being added

@barryvdh
Copy link
Collaborator Author

No but I think iframes is a pretty small part, especially since it's only been added like a few weeks ago.

With number and suffix:
image

@barryvdh barryvdh marked this pull request as ready for review March 19, 2024 20:36
@parallels999
Copy link
Contributor

Looks great to me, but I think it would look better with reversed items, so you could always see the last one

@barryvdh
Copy link
Collaborator Author

image

Clicking on date will reverse the sort + remember it

@barryvdh
Copy link
Collaborator Author

Not really sure about what to do when clicking though. Now it is:

  • Click on badge -> open that tab
  • Click on row -> Jump to last tab (if available) or first tab

Not sure if there is a case where you would want to keep the tab open after clicking on a dataset though.

@barryvdh
Copy link
Collaborator Author

Feels a bit weird though, think staying on page is better. Gonna try this out somewhere.

@barryvdh
Copy link
Collaborator Author

And made it configurable by now, disabled by default (might set default in the future)

@barryvdh barryvdh merged commit 6cfc9ae into master Mar 20, 2024
7 checks passed
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.

None yet

3 participants