-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow experience domains creation in task creation #4119
Conversation
@@ -410,7 +410,7 @@ class ExperienceModalView extends React.PureComponent<Props, State> { | |||
) : null} | |||
<SelectExperienceDomain | |||
disabled={false} | |||
mode="tags" |
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.
The mode property is no longer needed here. It served the purpose to be able to select the entered text/experience domain although it is not included in the suggestions. As I implemented this behaviour manually, this is no longer required. Please note that the approach "changing mode to 'tags' in task_create_form_view
" does change the behaviour of the select and thus this is not an option for the task creation view
.
@daniel-wer Could I please get your review on this PR? |
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.
Sry, this slipped through the cracks :/
Works like a charm, please see my small suggestion 👍
!options.includes(currentlyEnteredDomain) && | ||
currentlyEnteredDomain.trim() !== "" | ||
) { | ||
options.push(currentlyEnteredDomain); |
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.
I'm a bit hesitant about the modification of options here. Currently it's not a problem as state.domains
is filtered in getUnusedDomains
and returns a new array, but this could easily change in the future. This could then result in a hard to find state modification error.
Maybe change options to a let
and then do options = [...options, currentlyEnteredDomain];
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.
Thanks for paying attention to this 👍
…webknossos into allow-exp-domain-creation
This PR makes it possible to add new experience domains while creating tasks.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment