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

Improve saving indicator #3609

Closed

Conversation

manuelmeister
Copy link
Member

@manuelmeister manuelmeister commented Jun 30, 2023

Closes #894

output.mp4

@manuelmeister manuelmeister added type: Frontend UX/UI deploy! Creates a feature branch deployment for this PR labels Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jun 30, 2023

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

@pmattmann
Copy link
Member

pmattmann commented Jul 1, 2023

Already way better! <3
And I like the icon.

Some Issues:

  • The Multi-Select-Dropdown for ActivityResponsible does not give any response at all (what was already the case before).
  • Dropdonw in general - the feedback now is only give by color - and it is event hard do distinguish between blu e and green

Additional thought:
I guess users get used to autosave very quickly. Therefore the feedback could be even smaller.

<v-list three-line class="mx-n4">
<v-list-item-group>
<v-list three-line class="mx-n4 ec-lathematicarea">
<v-list-item-group multiple :value="model">
Copy link
Member

Choose a reason for hiding this comment

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

Is v-list-item-group really the correct component to use here? When navigating via keyboard, I can now focus either the checkbox or the whole list item. If I try to "activate" the list item via spacebar, it plays an animation but has no effect on the checkbox. Could you either make sure that only the checkboxes are focusable, or at least make the list item toggle the checkbox when "clicked" via keyboard?

Copy link
Member

@usu usu left a comment

Choose a reason for hiding this comment

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

Like it visually, thanks.

There is some inconsistency with non-autoSave mode. Best to check https://pr3609.ecamp3.ch/controls and review the changes.

There are quite some similar components inside ApiWrapperAppend, ApiWrapperCheckboxAppend & ApiWrapperSelectAppend. Could we reuse some of the code/visuals?

DayReponsibles and ActivityResponsibles have a manual implementation of e-select. So the saving incidators don't work for them (was already the case before). Might be worth to have a separate issue to implement a similar indicator for these 2 components.

Icon: I personally relate the chosen icon more with file upload than with a general saving action. I understand that the floppy disk is very archaic, but I guess it's still recognized widely as a saving icon. Have you seen the the cloud icon on other large platforms related with "saving"?

@@ -24,7 +24,7 @@ Displays a field as a e-select + write access via API wrapper
>
<template #append>
<v-icon>mdi-menu-down</v-icon>
<api-wrapper-append :wrapper="wrapper" />
<ApiWrapperSelectAppend :wrapper="wrapper" :resettable="resettable" />
Copy link
Member

Choose a reason for hiding this comment

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

When I click "Retry" in the Select, the drowdown opens. Do we need to have some @click.stop somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

I also noticed this in #3144 (the very last point)

Copy link
Member Author

Choose a reason for hiding this comment

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

This happened with the checkbox as well because of the label. I'll have a look.

@@ -101,6 +101,10 @@ export default {
required: true,
type: Object,
},
resettable: {
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this new property?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want to remove the reset functionality fully, but I currently can't find a usecase where this would be helpful.

</template>
<span>{{ $tc('global.button.tryagain') }}</span>
</v-tooltip>
<v-tooltip v-if="resettable" bottom class="ml-auto">
Copy link
Member

Choose a reason for hiding this comment

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

This breaks the activity title edit in the ScheduleEntry view (at the moment the only place where we use autoSave=false). The cancel button is not displayed.

<v-icon>mdi-check</v-icon>
</v-btn>
</template>
<span>{{ $tc('global.button.save') }}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Clicking here also opens the dropdown (although, I think that was already the case before)

@@ -0,0 +1,64 @@
<template>
<div class="ec-api-checkbox-append mt-n1">
<!-- Retry/Cancel button if saving failed -->
Copy link
Member

Choose a reason for hiding this comment

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

The Checkbox Append has now cancel button anymore? It's questionable, if we ever need a Checkbox in non-autosave mode. But shouldn't it have one, for consistency with the other input components?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think for an input that is a boolean, it just doesn't make sense to have this. I've shown this to multiple people and everyone thought it would remove the whole item, instead of resetting it to the previous state.

<ApiWrapperCheckboxAppend
v-if="
wrapper.hasServerError ||
(wrapper.autoSave && wrapper.dirty) ||
Copy link
Member

Choose a reason for hiding this comment

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

This should be !wrapper.autoSave.
The second part && wrapper.dirty depends on my other comment, on whether we want to display a cancel button or not.

Copy link
Contributor

@BacLuc BacLuc Jul 15, 2023

Choose a reason for hiding this comment

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

jest would like that you don't use multi line expressions in the vue html.
please extract this into a computed property

We don't use jest anymore since #3268

Copy link
Contributor

Choose a reason for hiding this comment

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

you can also leave it, found the problem.
The transformation jest uses does not allow optional chaining (?.), this is the problem in PrintConfigurator.vue and Invitation.vue.

Copy link
Contributor

@BacLuc BacLuc left a comment

Choose a reason for hiding this comment

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

ok for me if the other issues are resolved

<ApiWrapperCheckboxAppend
v-if="
wrapper.hasServerError ||
(wrapper.autoSave && wrapper.dirty) ||
Copy link
Contributor

@BacLuc BacLuc Jul 15, 2023

Choose a reason for hiding this comment

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

jest would like that you don't use multi line expressions in the vue html.
please extract this into a computed property

We don't use jest anymore since #3268

@@ -25,11 +32,11 @@ Displays a field as a e-checkbox + write access via API wrapper
<script>
import { apiPropsMixin } from '@/mixins/apiPropsMixin.js'
import ApiWrapper from './ApiWrapper.vue'
import ApiWrapperAppend from './ApiWrapperAppend.vue'
import ApiWrapperCheckboxAppend from '@/components/form/api/ApiWrapperCheckboxAppend.vue'
Copy link
Contributor

Choose a reason for hiding this comment

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

you could keep a relative import here

@BacLuc BacLuc removed the deploy! Creates a feature branch deployment for this PR label Sep 5, 2023
@BacLuc BacLuc mentioned this pull request Sep 12, 2023
19 tasks
@manuelmeister
Copy link
Member Author

@usu the /controls site is outdated and not fully functioning anymore. (birthday and isAdmin are missing)
I'm currently fixing a problem with parsing number inputs and tried the /controls page and was disappointed that it didn't work as expected. How can I fix these options (e.g. checkbox and date controls)?

@usu
Copy link
Member

usu commented Sep 23, 2023

@usu the /controls site is outdated and not fully functioning anymore. (birthday and isAdmin are missing) I'm currently fixing a problem with parsing number inputs and tried the /controls page and was disappointed that it didn't work as expected. How can I fix these options (e.g. checkbox and date controls)?

They have been broken for quite some time. The controls for checkbox/switch/date have been added a long time ago (3 years or so) and back then, the user endpoint had this properties just for the sake of testing these input types. There are issues and discussion on this under #1270 and https://github.com/ecamp/ecamp3/pull/673/files#r525987849.

Probably we should use other endpoints, if we want to test these input types with proper data. E.g. using the start date of the first period for the date picker? And for the checkbox/switch we could use $printYSLogoOnPicasso on the first camp.

@manuelmeister manuelmeister added the deploy! Creates a feature branch deployment for this PR label Dec 15, 2023
@BacLuc
Copy link
Contributor

BacLuc commented Dec 17, 2023

You need to merge devel again after #4136

@BacLuc BacLuc removed the deploy! Creates a feature branch deployment for this PR label Feb 17, 2024
@BacLuc
Copy link
Contributor

BacLuc commented Apr 14, 2024

I would rather keep long running PR in an issue.

@BacLuc BacLuc closed this Apr 14, 2024
@manuelmeister manuelmeister added the Cool Ideas Proof of concepts label Apr 14, 2024
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.

Improve api autosave success design
5 participants