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

Get and Set Config for Files and Plugins #1494

Merged
merged 6 commits into from
Sep 12, 2019
Merged

Get and Set Config for Files and Plugins #1494

merged 6 commits into from
Sep 12, 2019

Conversation

philippfromme
Copy link
Contributor

@philippfromme philippfromme commented Sep 5, 2019

App

  • unify ClientConfig and Config into Config
  • use /config.json as default
  • add provider for custom functionality

Client

  • add Client#getForFile, Client#setForFile, Client#getForPlugin and Client#setForPlugin
  • rename App#loadConfig to #getConfig

Related to #1066
Related to #1397

Closes #1425

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Sep 5, 2019
@philippfromme philippfromme changed the title WIP Get and Set Config for Files and Plugins Get and Set Config for Files and Plugins Sep 5, 2019
@philippfromme philippfromme added needs review Review pending and removed in progress Currently worked on labels Sep 5, 2019 — with bpmn-io-tasks
@philippfromme philippfromme changed the title Get and Set Config for Files and Plugins WIP Get and Set Config for Files and Plugins Sep 6, 2019
@philippfromme
Copy link
Contributor Author

@nikku @barmac I will add a minimal example of getting/setting deployment details to the deployment plugin stub. Will let you know when I'm done.

@philippfromme philippfromme changed the title WIP Get and Set Config for Files and Plugins Get and Set Config for Files and Plugins Sep 6, 2019
@philippfromme
Copy link
Contributor Author

@nikku @barmac Ready.

@nikku nikku force-pushed the 1066-config branch 2 times, most recently from 8213db8 to cad89a2 Compare September 9, 2019 09:49
nikku
nikku previously requested changes Sep 9, 2019
app/lib/config/__tests__/config-spec.js Show resolved Hide resolved
@nikku
Copy link
Member

nikku commented Sep 9, 2019

Test fail, please fix this.

@nikku
Copy link
Member

nikku commented Sep 9, 2019

I've removed the bits in this PR that expose the tab via props to the extension.

The way to access application state is via events. This is what we agreed upon to get out of the React propagation mess. 💯

@nikku
Copy link
Member

nikku commented Sep 9, 2019

@barmac Please take this PR over for review.

@barmac
Copy link
Collaborator

barmac commented Sep 9, 2019

Sure.

@philippfromme philippfromme force-pushed the 1066-config branch 3 times, most recently from 52f2b39 to 21ca07d Compare September 10, 2019 14:51
@philippfromme philippfromme dismissed nikku’s stale review September 10, 2019 14:52

@barmac is taking over the review

@philippfromme
Copy link
Contributor Author

@barmac Ready to be reviewed

@@ -8,8 +8,6 @@
* except in compliance with the MIT License.
*/

'use strict';
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the reason of disabling strict mode?

Copy link
Member

Choose a reason for hiding this comment

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

No need to do that:

  • ES modules => Strict is default, no 'use strict' header
  • NodeJS => Need 'use strict' header

Maybe there exists lint rules that can help us with keeping the the difference?

Copy link
Collaborator

Choose a reason for hiding this comment

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

To sum up, as the file is not an ES module, 'use strict'; should stay.

* unify ClientConfig and Config into Config
* use <userPath>/config.json as default
* add provider for custom functionality

* add Client#getForFile, Client#setForFile, Client#getForPlugin and Client#setForPlugin
* rename App#loadConfig to #getConfig

Related to #1066
Copy link
Collaborator

@barmac barmac left a comment

Choose a reason for hiding this comment

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add stable API to access workspace configuration from plug-ins
3 participants