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(components/sidepanel): accept custom action ids #846

Merged
merged 6 commits into from
Nov 15, 2017

Conversation

ncomont
Copy link
Contributor

@ncomont ncomont commented Nov 13, 2017

What is the problem this PR is trying to solve?

Actions ids are base on the action's label. It cause problems with i18n (for example TDP onboarding uses theses IDs to target elements).

What is the chosen solution to this problem?

Actions can have a new id property.

Please check if the PR fulfills these requirements

  • The PR commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Related design / discussions / pages (not in jira), if any, are all linked or available in the PR

[x] This PR introduces a breaking change

Before this, action ids were ignored. Now, if an id is provided per action, it will be used instead of the label ; so it could break some QA tests.

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

action.id ||
action.label
.toLowerCase()
.split(' ')
Copy link
Contributor

Choose a reason for hiding this comment

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

a regexp could be used here but i guess it is a lot more readable the way you did it

action.label
.toLowerCase()
.split(' ')
.join('-');
Copy link
Contributor

@talend-glorieux talend-glorieux Nov 14, 2017

Choose a reason for hiding this comment

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

Please move this to an actionId generator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

Copy link
Contributor

@jsomsanith-tlnd jsomsanith-tlnd left a comment

Choose a reason for hiding this comment

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

Can you add an entry in breaking changes log please ?
The id was ignored before, not now, it can break QA tests. This should be documented

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

1 similar comment
@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

@frassinier frassinier merged commit a5204ab into master Nov 15, 2017
@frassinier frassinier deleted the ncomont/feat/components/accept_custom_action_ids branch November 15, 2017 11:20
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.

None yet

7 participants