-
Notifications
You must be signed in to change notification settings - Fork 50
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
Improve saving indicator #3609
Conversation
⛔ Feature branch deployment currently inactive.If the PR is still open, you can add the |
Already way better! <3 Some Issues:
Additional thought: |
<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"> |
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.
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?
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.
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" /> |
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.
When I click "Retry" in the Select, the drowdown opens. Do we need to have some @click.stop somewhere?
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 also noticed this in #3144 (the very last point)
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.
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: { |
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.
What is the purpose of this new property?
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 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"> |
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.
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> |
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.
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 --> |
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 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?
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 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) || |
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.
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.
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.
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
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.
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.
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.
ok for me if the other issues are resolved
<ApiWrapperCheckboxAppend | ||
v-if=" | ||
wrapper.hasServerError || | ||
(wrapper.autoSave && wrapper.dirty) || |
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.
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' |
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.
you could keep a relative import here
@usu the /controls site is outdated and not fully functioning anymore. (birthday and isAdmin are missing) |
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 |
You need to merge devel again after #4136 |
I would rather keep long running PR in an issue. |
Closes #894
output.mp4