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

Addon-controls: Angular support #10946

Merged
merged 9 commits into from
May 28, 2020
Merged

Addon-controls: Angular support #10946

merged 9 commits into from
May 28, 2020

Conversation

shilman
Copy link
Member

@shilman shilman commented May 27, 2020

Issue: #10583 #10956

What I did

angular-controls

Partial support for angular:

  • scalar types
  • object/array types
  • enum types

How to test

See angular-cli stories and added test cases

@shilman shilman added this to the 6.0 args milestone May 27, 2020
@shilman shilman changed the title Addon-controls: Angular support Addon-controls: Angular scalars May 27, 2020
@shilman shilman changed the title Addon-controls: Angular scalars Addon-controls: Angular scalar support May 27, 2020
@matheo
Copy link
Member

matheo commented May 28, 2020

@shilman I can help with this, I just need to be able to build:watch and link the built package locally to my project without verdaccio, is it possible?

@shilman
Copy link
Member Author

shilman commented May 28, 2020

Thanks @matheo I'm almost done with this -- making a few last-minute tweaks and will merge/release in the next 1-2h. To try it out, follow the instructions in CONTRIBUTING.md, or TLDR is yarn dev in one window and yarn storybook in examples/angular-cli

@shilman shilman changed the title Addon-controls: Angular scalar support Addon-controls: Angular support May 28, 2020
@matheo
Copy link
Member

matheo commented May 28, 2020

Great news, I will test this out and help to fix any issue that I may find.
I'm checking at the options controls, great stuff available!

BTW, can we add paramKey to the Controls tab to disable it as any other panel?
and I still wonder if it's possible to rename/reorder panels tho
Thanks for this great addon!

@shilman
Copy link
Member Author

shilman commented May 28, 2020

@matheo i think this should behave just like any other addon. i haven't added any support for enable parameter, but otherwise you can play with it and see if it does what you need. gonna do a few touchups on #10953 and then merge/release after both CI pass

@matheo
Copy link
Member

matheo commented May 28, 2020

@shilman sounds good!
just to clarify, I'm talking about the missing addPanel.paramKey:

addons/controls/src/register.tsx

-import { ADDON_ID } from './constants';
+import { ADDON_ID, PARAM_KEY } from './constants';

addons.register(ADDON_ID, (api: API) => {
  addons.addPanel(ADDON_ID, {
    title: 'Controls',
    type: types.PANEL,
+    paramKey: PARAM_KEY,

to support controls: { disable: true } by default.

@shilman
Copy link
Member Author

shilman commented May 28, 2020

@matheo Aha, didn't know about paramKey--thanks for the heads up. Fixed & will merge/release soon 🤞

@shilman
Copy link
Member Author

shilman commented May 28, 2020

Self-merging @tmeasday

@shilman shilman merged commit 93658d5 into next May 28, 2020
@stof stof deleted the 10583-controls-for-angular branch May 25, 2022 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants