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

feat: Consolidate and normalize plugin types #1456

Merged
merged 4 commits into from
Sep 8, 2023

Conversation

mattrunyon
Copy link
Collaborator

Fixes #1454. Needs #1451

Still some cleanup that could be done around DashboardPlugin. I think instead of static metadata on the component (displayName is ok since it's part of React) those items should probably be part of the config object.

@mattrunyon mattrunyon self-assigned this Aug 22, 2023
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Patch coverage: 39.58% and project coverage change: +0.04% 🎉

Comparison is base (c24d191) 45.74% compared to head (18655e4) 45.79%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1456      +/-   ##
==========================================
+ Coverage   45.74%   45.79%   +0.04%     
==========================================
  Files         516      518       +2     
  Lines       35095    35132      +37     
  Branches     8785     8803      +18     
==========================================
+ Hits        16055    16087      +32     
- Misses      18989    18994       +5     
  Partials       51       51              
Flag Coverage Δ
unit 45.79% <39.58%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ackages/app-utils/src/components/AuthBootstrap.tsx 93.33% <ø> (ø)
...ashboard-core-plugins/src/panels/IrisGridPanel.tsx 42.44% <0.00%> (-0.12%) ⬇️
packages/dashboard/src/DashboardPlugin.ts 18.18% <ø> (ø)
packages/iris-grid/src/IrisGrid.tsx 27.00% <0.00%> (ø)
packages/code-studio/src/main/AppMainContainer.tsx 34.21% <25.00%> (-0.01%) ⬇️
packages/plugin/src/PluginTypes.ts 38.88% <38.88%> (ø)
packages/app-utils/src/plugins/PluginUtils.tsx 31.03% <56.25%> (+8.64%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@mattrunyon mattrunyon marked this pull request as ready for review August 23, 2023 19:31
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to update template: deephaven/deephaven-js-plugin-template#1

packages/plugin/src/PluginTypes.ts Show resolved Hide resolved
packages/code-studio/src/main/AppMainContainer.tsx Outdated Show resolved Hide resolved
@mattrunyon
Copy link
Collaborator Author

I'd like to pull out DashboardPlugin too, but the dependency there on PanelManager is tricky w/ redux and that change feels like it would warrant its own PR

packages/plugin/src/PluginTypes.ts Show resolved Hide resolved
packages/app-utils/src/plugins/PluginUtils.tsx Outdated Show resolved Hide resolved
packages/app-utils/src/plugins/PluginUtils.tsx Outdated Show resolved Hide resolved
packages/code-studio/src/main/AppMainContainer.tsx Outdated Show resolved Hide resolved
Comment on lines 24 to 26
"devDependencies": {},
"dependencies": {},
"peerDependencies": {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're missing some dependencies here? This package definitely references @deephaven/iris-grid, @deephaven/components, @deephaven/jsapi-types from TablePlugin.
That's one thing kind of annoying about this - creating an AuthPlugin, you don't care about @deephaven/iris-grid at all, but you need to import this package which will have a dependency on that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya they're technically dev dependencies since they aren't needed to run, but the types are required for someone else to install the package and get type support. So that would make them regular dependencies

I can't think of a better way that doesn't require you to install iris-grid or components. Unless we want to duplicate the types across both or pull them into a separate, shared types package which doesn't really make sense for these types IMO.

If we want to consolidate the definitions, I think it's just something we have to accept as a trade-off. We could make packages for each plugin type, but I'm not really a big fan of adding more packages here just to save a few MB of disk space for a development environment

packages/plugin/package.json Outdated Show resolved Hide resolved
packages/plugin/src/PluginTypes.ts Show resolved Hide resolved
@mattrunyon mattrunyon merged commit 43a782d into deephaven:main Sep 8, 2023
5 checks passed
@mattrunyon mattrunyon deleted the plugin-config branch September 8, 2023 19:10
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalize and centralize plugin types and configs
2 participants