-
Notifications
You must be signed in to change notification settings - Fork 12
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
Migrate vscode-webview-ui-toolkit to primereact #57
Migrate vscode-webview-ui-toolkit to primereact #57
Conversation
Failed due to CI requiring Node 18, see #58 Please rebase this on main to fix. |
- Use primereact theme aligned to VSCode - Use formik for input handling - Allow to submit on enter - Show loading icon on fetch - Use lazy loading and virtual scrolling - Fix column alignment - Fix resetting of memory address after webview focus change
7814d07
to
deefa46
Compare
@thegecko Thanks, I rebased and now the action requires an approval. |
A few thoughts:
etc. etc. Are all of those imports in fact used in the Memory Inspector UI? If they aren't, why are they being imported? |
You are absolutely correct. I left them because that was the default way, and we should remove them. However, concerning the
My tendency is to make 3) work. What do you think? |
I'd say the description makes me even more nervous about the framework as a whole: it sounds like we don't really know what we need to do to make it work for us, and that makes it sound like it's either not very well documented or it's not very well architected. Can you elaborate a little bit on why you chose this framework for reimplementing the UI? |
Thanks for your feedback @colin-grant-work My team at Arm and EclipseSource have investigated different frameworks we could use in this project which give us the flexibility, customisability and theming required to deliver a tool mainly focussed around a rich table which feels native to VS Code. We have had much success with primereact in our other extensions at Arm and found it to be a very good option with a large user base and good support. Please feel free to recommend a different table component which we can contrast/compare.
Although I believe tree-shaking is removing the components we don't use, I agree stripping out the style sheets for unused components will make the codebase easier to maintain. This approach would mean we need to add them back in as leverage more components, however. |
@colin-grant-work: Please pardon me if my explanation made you unsure. The theming is used on top of
|
@colin-grant-work @thegecko the changes should be now minimal without the overhead. Can you please provide feedback again? Thanks! |
Looks good, thanks for the update |
Thanks, I appreciate the reduction in the boilerplate. I'll take a closer look at the specifics later today. |
For the record, I'm also not opposed to the infinite scroll feature (as long as it's possible to opt out). I just think it should be a separate PR. Feel free to open one with this as the base, so that it can be addressed when this one gets in. |
@thegecko @colin-grant-work as we now have a scrollable table changing the @colin-grant-work should I squash the changes? |
As you like. If you don't squash, I'll use the |
A very minor comment, but while we're changing around a lot of the CSS, would it be possible to get the address column to be sized to |
I've been looking into the virtual scroller with dynamic row heights and wanted to suggest that we consider tackling this as a follow-up task. Implementing this feature is quite complex due to the need for sophisticated calculations for dynamic content sizes, which can significantly impact development time. Would it be also fine for you @colin-grant-work? Apart from that, I think the current solution now provides a similar experience as the original version. |
Previously, some (in fact all, I believe) columns used a monospace font, but it appears that in the current iteration, all columns use a non-monospace font by default. Monospace is certainly preferable for the data and address columns; very likely for ASCII, and it wouldn't do any harm in the variable column, so I think it's a better default. |
Different widthsStill possible to resizeHint: It will not automatically break like the other columns! We are defining, that the column width should always be the content width. Allowing also to break would result in a contradiction CSS-wise. That means, we can not say, that it should also break after reaching some max percentage like the other columns - we can provide a We can solve this in a follow-up task with JS if required. |
The new default sizing looks good. I hadn't noticed the resizability until you mentioned it in one of your commit messages and your screenshots. I won't hold up this PR, but I think to make that feature more discoverable, the drag handle would need to be visible. |
What it does
Migrates the
vscode-webkit-toolkit
to primereact.DataTable
Options
Enter
formik
has been used for better handling of input fields. (Side note: This framework is also recommended byprimereact
)Misc
vscode host
Bug Fixes
Follow up
How to test
Open the memory-inspector with the known ways.
Review checklist
Reminder for reviewers
Closes #54