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 ability to "refresh" the devtools panel #169

Open
HugoDF opened this issue Mar 6, 2021 · 6 comments
Open

Add ability to "refresh" the devtools panel #169

HugoDF opened this issue Mar 6, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@HugoDF
Copy link
Collaborator

HugoDF commented Mar 6, 2021

Some issues wouldn't be as bad (#165 #151 ) if we had a way for the user to manually "refresh" (really re-initialise) the devtools panel

We can use the heroicons reload icon:

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>

Some suggestions where we could add it (in the tabs, or next to the github icon), there's probably a way to add it in the "components" tab body cc @stephenoldham

Screenshot 2021-03-06 at 19 42 47

@HugoDF HugoDF added the enhancement New feature or request label Mar 6, 2021
@stephenoldham
Copy link
Contributor

Like the idea. As far as where to put it in the UI, I guess it depends on what the refresh is limited to. Are we just refreshing the components or will the refresh also clear any warnings and events in those tabs as well?

@HugoDF
Copy link
Collaborator Author

HugoDF commented Mar 8, 2021

Like the idea. As far as where to put it in the UI, I guess it depends on what the refresh is limited to. Are we just refreshing the components or will the refresh also clear any warnings and events in those tabs as well?

Interesting point 🤔 , we could make it so that "refresh" applies only to the current component's data, we would have to rework some of the messaging, guess it would be related to #10

@stephenoldham
Copy link
Contributor

stephenoldham commented Mar 9, 2021

Yeah I guess really we could have two levels of refresh. One that triggers the refresh/re-walking of all components and one that was related to an individual component.

By no means a suggestion for final UI but here's what I think a user would expect from the following placements for a button:

AlpineJsRefreshLocations

  1. Would refresh the whole panel; components, events and warnings
  2. Refresh the data for the selected component
  3. Refreshes the components list; discovering new dynamic components for example

@HugoDF
Copy link
Collaborator Author

HugoDF commented Mar 9, 2021

Oof the UX of having 3 refresh buttons 👀👀👀

Opened up react devtools, they don't even have a refresh button haha, the benefits of first party devtools support I guess.

Vue.js devtools have refresh at the top-level (like you've got in the tab bar).

I think that might the most reasonable approach to be fair: top-level "refresh" in the tab bar (what's been detailed as 1.), to allow the user to restart the panel without closing devtools or refreshing the page. It'll be an ok workaround if someone's in a pinch but hopefully they'll come report the issue here.

What we could do for the component data refresh is do it under the hood when a "component" gets selected in the left pane (that would be good for an eventual move to more granular data loading: first load components/names, when a component gets selected, load the relevant data).

@stephenoldham
Copy link
Contributor

Oof the UX of having 3 refresh buttons 👀👀👀

Ha! ALL THE REFRESH BUTTONS! 😆

I think that might the most reasonable approach to be fair: top-level "refresh" in the tab bar

I agree. It's simple and clear for users I think.

What we could do for the component data refresh is do it under the hood when a "component" gets selected in the left pane (that would be good for an eventual move to more granular data loading: first load components/names, when a component gets selected, load the relevant data).

Yeah really like that, makes a lot of sense.

@HugoDF
Copy link
Collaborator Author

HugoDF commented Mar 9, 2021

I'll split that more granular data loading as a separate issue, it'll be mostly a perf thing with UX benefits.

@HugoDF HugoDF changed the title Add ability to "refresh" the data from the devtools panel Add ability to "refresh" the devtools panel Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants