altinn-studio
altinn-studio copied to clipboard
Make it possible to edit actions on tasks
Description
Add an accordion in task config panel to edit actions on a task. The action can be added by selecting one of the predefined, or a custom action can be entered in the same combobox. If adding a custom action a checkbox will be visible that allows the user to define their custom action as a server-action.
Some tasks, confirm and sign, have default actions that cannot be changed so these will be presented in readonly mode.
The sign-action is also not possible to add to other tasks than signing. This might be the case for confirm-action and confirmation as well?
The help-text for the server-action check box needs some UX input 😬
https://github.com/Altinn/altinn-studio/assets/71079896/05d1cb4b-7413-4580-b469-d86d1284a43c
Related Issue(s)
- #{issue number}
Verification
- [x] Your code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [x] Relevant automated test added (if you find this hard, leave it and we'll help out)
Codecov Report
Attention: Patch coverage is 95.48387%
with 7 lines
in your changes are missing coverage. Please review.
Project coverage is 90.24%. Comparing base (
2976982
) to head (b1b3b8c
).
Additional details and impacted files
@@ Coverage Diff @@
## main #12672 +/- ##
==========================================
+ Coverage 90.20% 90.24% +0.03%
==========================================
Files 1310 1318 +8
Lines 18770 18914 +144
Branches 2283 2310 +27
==========================================
+ Hits 16931 17068 +137
- Misses 1579 1582 +3
- Partials 260 264 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Design: https://www.figma.com/file/VAvGOqkMhKM8HL8h4xBeDH7b/Re-design-Altinn-Studio?type=design&node-id=11294%3A5330&mode=design&t=hNAwcaEHVKDooPAP-1
The text in the sketches should be discussed more
I have tested the branch locally and have a few observations 😊
- When I add a new action and select from the existing options (f.eks.
write
), I am not able to "save"/accept until i blur the field. Would expect to be able to do this immediately. - Same scenario as above, the switch for
serverAction
is not hidden until I blur the field. If I try to click in the switch, it disappears. Expected that it should be hidden, but confusing that it disappears when I try to click it. Ideally it should not be there when one of the default process actions is selected.
Should the serverAction
switch only be shown if the user types a custom action (i.e. default is that it is not shown for a new action)?
Also we really need to work on the text for the serverAction
switch, took me a while to understand what it was meant to do.
I have tested the branch locally and have a few observations 😊
- When I add a new action and select from the existing options (f.eks.
write
), I am not able to "save"/accept until i blur the field. Would expect to be able to do this immediately.- Same scenario as above, the switch for
serverAction
is not hidden until I blur the field. If I try to click in the switch, it disappears. Expected that it should be hidden, but confusing that it disappears when I try to click it. Ideally it should not be there when one of the default process actions is selected.
Agree on all the points. And noticed these limitations myself, but this turned out to be the best solution considering the limitations in the combobox component, which is not developed to handle custom input values. They are currently working on a solution to make the combobox more usable for that usecase.
Should the
serverAction
switch only be shown if the user types a custom action (i.e. default is that it is not shown for a new action)?
Here I dont know what is the best user-experience. I took a design choice based on what I read on the docs, that all predefined actions are processactions anyway, so it only makes sense selecting it for a custom yes. So I can check if I can adapt the code to only show if the selected option is not a predefined or if the input value is empty.
Also we really need to work on the text for the
serverAction
switch, took me a while to understand what it was meant to do.
Absolutely 😅
Should the
serverAction
switch only be shown if the user types a custom action (i.e. default is that it is not shown for a new action)?Here I dont know what is the best user-experience. I took a design choice based on what I read on the docs, that all predefined actions are processactions anyway, so it only makes sense selecting it for a custom yes. So I can check if I can adapt the code to only show if the selected option is not a predefined or if the input value is empty.
Great! I re-tested this now and it seems to solve the other problem where the switch was shown for "default" actions as well 🥳