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

Add actions to process task #12151

Closed
Tracked by #11695
nkylstad opened this issue Jan 25, 2024 · 9 comments · Fixed by #12672
Closed
Tracked by #11695

Add actions to process task #12151

nkylstad opened this issue Jan 25, 2024 · 9 comments · Fixed by #12672

Comments

@nkylstad
Copy link
Member

nkylstad commented Jan 25, 2024

Description

App developer should be able to add/edit actions to a task in their process.
An action can have a type (serverAction or processAction), and a name/value that defines the name of the action.
See https://docs.altinn.studio/app/development/process/actions/ for more details.

This is probably something that will have to be done through a customized bpmn properties panel

@nkylstad nkylstad added status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. app-fe-v4 labels Jan 25, 2024
@nkylstad nkylstad moved this to 📈 Todo in Team Studio Jan 29, 2024
@nkylstad nkylstad moved this from 📈 Todo to ⚠️ Blocked in Team Studio Feb 12, 2024
@nkylstad
Copy link
Member Author

Combobox should support adding custom values, and will probably be supported soon.
So first version of this is to POC the functionality, without any specific design.
If combobox supports the custom value functionality we can add this, otherwise add the functionality under a feature flag.

@nkylstad
Copy link
Member Author

Waiting for #12272 to ensure we implement this in the same way.

@framitdavid framitdavid removed the status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. label Mar 11, 2024
@nkylstad nkylstad moved this from ⚠️ Blocked to 📈 Todo in Team Studio Apr 8, 2024
@standeren standeren moved this from 📈 Todo to 👷 In Progress in Team Studio Apr 11, 2024
@standeren standeren self-assigned this Apr 11, 2024
@standeren standeren linked a pull request Apr 16, 2024 that will close this issue
3 tasks
@standeren standeren moved this from 👷 In Progress to 🔎 Review in Team Studio Apr 30, 2024
@standeren standeren removed their assignment Apr 30, 2024
@framitdavid framitdavid assigned ghost and ErlingHauan and unassigned ghost May 6, 2024
@ErlingHauan ErlingHauan assigned standeren and unassigned ErlingHauan May 7, 2024
@github-project-automation github-project-automation bot moved this from 🔎 Review to 🧪 Test in Team Studio May 8, 2024
@standeren standeren removed their assignment May 8, 2024
@framitdavid framitdavid self-assigned this May 13, 2024
@framitdavid
Copy link
Collaborator

framitdavid commented May 13, 2024

Great work! 👏 🚀

I have some feedback on the user experience and UI for this feature.

The saving challenge
When choosing a predefined action, the input field must be blurred for the save button to be enabled. This currently disrupts the keyboard navigation, because when tabbing to the next element it focuses on the delete button instead of the saving button. The reason is that the save button is disabled when tabbing happens.

Suggestion: Could we fix the issue above by implementing auto-saving when selecting a predefined action?

Note: It's easy to forget to save since I can select an option and navigate to another place without getting a warning about unsaved changes

Figure 1: Shows that the save button is disabled after a predefined action is selected.
Image

Custom Actions
When writing a custom action I got the dropdown menu telling me to "Write a custom action", and I think this might confuse some of our users. The reason for the confusion is that normally the dropdown has clickable/selectable items. In this case, is just plain text information about writing a custom action. The user needs to understand that it means the text the user already has written in the input field.

Suggestion: What about splitting the view? Ex. using tabs for predefined and custom actions? @Annikenkbrathen.

Figure 2: Displays the custom actions
Image

Adding empty actions
It's possible to add empty actions to the XML, will this cause any side-effect or issues? 🤔

Figure 3: Displays bpmn file with empty actions.
Image

Filtering options on the client
I see this more like a nice-to-have feature. But, should we do some filtering on the client side to avoid the opportunity to add the same action multiple times before saving?

Figure 4: Displays that is possible to add more of the same
Image

All predefined actions is already added
When all predefined actions is already added, should we inform the user about it? I think this would be easier and more clear if the split the predefined and custom actions.

Figure 5:
Image

Edit custom actions
If we continue to have predefined and custom actions altogether, should we add/merge your custom actions with the predefined ones? To make it easier to change to a predefined action without needing to erase the custom action first?

Figure: 6: Edit custom action
Image

@framitdavid framitdavid moved this from 🧪 Test to 👀 Test feedback in Team Studio May 13, 2024
@framitdavid framitdavid removed their assignment May 13, 2024
@standeren
Copy link
Contributor

Very thoroughly testing @framitdavid! 😍

When choosing a predefined action, the input field must be blurred for the save button to be enabled.
This is in some way a limitation that comes from the combobox from ds is not designed for this usecase (yet).

So as you are mentioning:

Could we fix the issue above by implementing auto-saving when selecting a predefined action?

I have included a comment on that in the code. Enabling the auto-saving onBlur will also remove the need of a useState to hold the current value ☺️ It is explained a bit here

It's possible to add empty actions to the XML, will this cause any side-effect or issues? 🤔

Maybe that could be a part of some global app validation on deploy (as we have discussed earlier)? Or maybe it is not really an issue. But deffinetly something we should check out! 🤩

I see this more like a nice-to-have feature. But, should we do some filtering on the client side to avoid the opportunity to add the same action multiple times before saving?

I agree that it would be nice! But maybe we should also consider the value it gives for what cost? In other words, the backside to that they are able to define multiple similar actions, I think are none? So even though it is not logic and useless I think it is unnecessary resources for us to implement a hard restriction since it is not directly dissructive for the app 🫣

When all predefined actions is already added, should we inform the user about it? I think this would be easier and more clear if the split the predefined and custom actions.

Agree that we could consider a split. But if we decide to keep it as is, could it be enough to change the wording of the description a bit; Velg en ledig handling eller definer din egen or Velg en av de predefinert handlingene eller definer din egen?

If we continue to have predefined and custom actions altogether, should we add/merge your custom actions with the predefined ones? To make it easier to change to a predefined action without needing to erase the custom action first?

Is it possible with the combobox? I think it only shows the options that matches the current value 🤔

@Annikenkbrathen
Copy link

Agree!
The save buttons should be replaced by an auto-save function if possible. To have a save button here and not in other places might confuse the user about whether Studio has autosave or not. We should be consistent with the use of autosave in Studio. Additionally, it’s easy for the user to forget after you’ve made a selection; the select box closes, and it might seem like you’ve selected and saved in the same step.

I can look into how we can split predefined and custom actions into two separate options, for example by using tabs. If we don't like that option, we can keep it as one combobox, but then we should make it clear how to create a custom action by saying something like 'write your own name for your custom action in the select box to define your own action.'

@Annikenkbrathen
Copy link

Skjermbilde 2024-05-15 kl  09 01 19

Could this work? @standeren @framitdavid

@framitdavid
Copy link
Collaborator

@Annikenkbrathen based on the screenshots above, I like that they are explicit between choosing an action and creating an action. Is the idea that the one you create will appear in the list under the "Velg handling" tab along with the ones that are already predefined?

@framitdavid
Copy link
Collaborator

@standeren let's keep this issue as is! I have created a new one that takes care of the feedback. However, should we change the text to: "Velg en forhåndsdefinert handling fra nedtrekkslisten eller definer din egen ved å skrive inn navnet som fritekst i feltet", to make it more clear for the user about how to add a custom action?

@standeren
Copy link
Contributor

@standeren let's keep this issue as is! I have created a new one that takes care of the feedback. However, should we change the text to: "Velg en forhåndsdefinert handling fra nedtrekkslisten eller definer din egen ved å skrive inn navnet som fritekst i feltet", to make it more clear for the user about how to add a custom action?

#12837 😁

@framitdavid framitdavid moved this from 👀 Test feedback to ✅ Done in Team Studio May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants