-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: eda plot view #1161
feat: eda plot view #1161
Conversation
- runnerApi that now handles any eda vscode requests to runner, for starter getPlaceholderValue - edaPanel now renamed panelsMap to instancesMap that also saves RunnerApi instance - RunnerApi instance takes: services, pipelinePath (which is needed to get the document of pipeline that is to be extended) - along with above no longer option for PanelIdentifier or pipelineId to be undefined, not needed anymore without dev methods that start blank eda sessions and this way more safe and solid
- revaling already exisiting panel bug where undefined state, found out it's because the _update() method is only fully executed after current state was already found - new variable updateHtmlDone that is set to false on either creating new panel or revealing current one and to true on _update() done; constructCurrentState will only be executed once that variable is true or with a timeout of 10s
- filters: - for the filter to decide between: 1. search string 2. value range 3. distinct value, the tableView must decide for each column if numerical => value range or categorical => many values => search string OR little Values => distinct value - for that profiling for numerical items (that show % for example) now have new property "interpretation" which can be "warn" (for missing val), "category" (for this) or "default" - faster than iterating through categorical cols to count values for huge data, since we have this info on profiling generation already - whereas for value range find min max ourselves, since otherwise would need more in pipeline and more placeholder value queries, and this should be faster filters then in own component that decides what to show and calls vscode to initiate the runner code execution - as deliberated before kind of: selections are now not cleared by clicks anywhere anymore but only clicks on main cells, as the global window listener to clear was getting too convoluted, now don't need the rowClicked or columnClicked params anymore - preventClicks store is now set to false on context menu close with 100ms delay to allow time to prevent clicks - handleRightClickEnd decides per menu if to close and set those cleanup things or not, like for filter it doesn't if clicked anywhere in context menu by looping over html elements and their parents
- pipelineId renamed to piprlineExecutionId for more sense multiple pipelines: - eda from context now gets exact ast node of placeholder with range of the executed context and from there the pipeline container => pipeline name - pipeline name is passed to execute pipeline which is now needed - also sent to eda where 1. it is used for tableIdentifier as pipelineName + '.' + tableName (tableName new param used and passed outside of tableIdentifier) and 2. it is passed to runner for pipeline execution - in Runner the pipeline in question is found and in front of it's closing } the new code is then added - getStateByPlaceholder now getTableByPlaceholder and transform to state obj in eda class, whee table name and table identifier are known, this method now only relevant stuff - createOrShow async as well as calling register command methods - runnerApi now instance var of panel
- got rid of an excess profiling banner div: - Now apparently now methods for table resize/TableSpace needed anymore, all handled by html itself - Meaning I also cannot change much about that mechanism, other than the min width, set by setting width on startup of the elements - Also means a lot less code and complexity! - savedColumnWidths now is a svelte store, that the table subscribes to, meaning it updates correctly, only needed on resize and reorder (when letting the col go); also now no manual setting of stlyle for this anymore - the automatic handling by html meant that reordering did not properly take out of table, so now a "reorderPrototype" of a column header that is used for the under cursor display and updates with relevant data, while column is made "display: none" in table - Min width maybe as initial width if it is being streched, then increasing size of a col will not result in others shrinking, but how to decide if in full view or not? - Also full view makes scrolling for fixed stuff lag?? Mabye visible scroll bar or extra tiny div - Fixed that full view makes fixed stuff lag by making table width 100.1% instead of 100%, so always tiny bit out of view that causes scroll to exist - increased scroll buffer a bit to make more fluent - now you cannot see the table text through the borders of the headers/profiling anymore if table scrolled - have an absolute div at 100% with at top that is bright bg color normal height = 2 * rowHeight - if profiling expanded then delayed (since height animation of profilingInfo) setting of height to 2 * rowHeight + profilingInfo height, not complete height as not including for example borders but enough to cover all bg space that let's text through - top prop of this also = scrollTop
- changed profiling to always include value, not name, as we display values - thus image string also as "value" as well as string when just using "text" type (prev. "name" type)
- profiling placeholder name gen now not random but with codegen prefix + incr counter number
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1161 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 110 110
Lines 19238 19238
Branches 4114 4114
=========================================
Hits 19238 19238 ☔ View full report in Codecov by Sentry. |
@lars-reimann a note on this: Creating a boxplot on a non-numeric column throws an error. For other plots this works fine. Should I manually disallow boxplots for categorical columns (with my limited interpretation of categorical vs numerical atm) or is there smth to be done elsewhere? |
@SmiteDeluxe There are several options: I don't expect major changes to this, other than dropping the prefix "Experimental" from the name. We could also add the options |
@lars-reimann Will go wit the is_numeric then for now and disallow boxplots for other columns. Will do a new PR for that after this is merged! |
Alright. I probably won't be able to review this PR before the weekend. |
Although, maybe I'll find time to review it tomorrow morning and do another release for the lab. Looks awesome at first glance! |
@lars-reimann for this: ExperimentalDataType.is_numeric Do I need to define my own stubs? |
Nope, it's in the latest release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No suggestions, very nicely done!
## [0.16.0](v0.15.0...v0.16.0) (2024-05-16) ### Features * eda plot view ([#1161](#1161)) ([a216743](a216743)), closes [#955](#955) [#986](#986) * integrate version 0.25.0 of the `safe-ds` Python library ([#1174](#1174)) ([f357c38](f357c38)) * prefix keywords with `^` to treat them as identifiers ([#1172](#1172)) ([90bd47c](90bd47c)) ### Bug Fixes * potential stack overflow when computing types of lambda parameters ([#1173](#1173)) ([d89511e](d89511e))
🎉 This PR is included in version 0.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #955
Closes #986
Summary of Changes
Implemented history/action structure for webview to add new actions to state and have them (if external and info not already present) send execute requests to runner that are then cancellable or deployed in correct order. Only fully working for Plots/Tabs at the moment, that are on deploy added to tabs state and set as currentIndex. All Tabs and Table retain their state. Runner uses existing methods in RunnerAPI to get back to relevant state by executing past manipulating actions and then returns the result of the new action (only if plots right now).
Tabs can be created by selecting columns and right clicking, zooming in on profiling images or by creating an empty tab with the plus icon in the sidebar. There in the guided menu users can change the current Tab to display other info. At that point the tab will go into building state and show prompts, loading screens and buttons accordingly. Typings are adapted to abstract as much as possible (mainly around column count for tabs, none, one and two) and stores are heavily used for reactivity.