-
Notifications
You must be signed in to change notification settings - Fork 64
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
Features/824 redesign data pages #1133
base: master
Are you sure you want to change the base?
Features/824 redesign data pages #1133
Conversation
5ad7c12
to
0e82126
Compare
fc7f618
to
3cf4135
Compare
3cf4135
to
3e59dc2
Compare
<label id="audit-filters-action" for="audit-actions" class="form-group"> | ||
<select id="audit-actions" ref="auditActions" class="form-control" :value="modelValue" |
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.
If the form control is in the <label>
, I don't think the <label>
needs for
. From MDN:
you can nest the
<input>
directly inside the<label>
, in which case thefor
andid
attributes are not needed because the association is implicit
:aria-disabled="disabled" v-tooltip.aria-describedby="disabledMessage" | ||
:placeholder="requiredLabel(placeholder, required)" autocomplete="off" | ||
:placeholder="$t('common.none')" autocomplete="off" |
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 think it's possible to use a single word for "none" for different filters, since some languages inflect "none" based on what it describes. For example, we translate submission.noSubmission
and entity.noEntity
separately. I think each filter probably needs its own translation for "none".
@@ -10,19 +10,23 @@ including this file, may be copied, modified, propagated, or distributed | |||
except according to the terms contained in the LICENSE file. | |||
--> | |||
<template> | |||
<div ref="dropdown" class="multiselect form-group"> | |||
<label ref="dropdown" :for="toggleId" class="multiselect form-group"> |
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's the benefit of making this a <label>
? Since this is the root element, and it encloses the .dropdown-menu
, I'd be slightly concerned that it'd include that content in the label. The <select>
has an aria-label
, so I don't think a <label>
element is essential here.
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 wanted to make all elements clickable to open the dropdown menu, but I see what you are saying. I am removing it and just wrapping select
, span for {{ label }} and span.icon in a new div with data-toggle
@@ -10,14 +10,15 @@ including this file, may be copied, modified, propagated, or distributed | |||
except according to the terms contained in the LICENSE file. | |||
--> | |||
<template> | |||
<label class="form-group"><!-- eslint-disable-line vuejs-accessibility/label-has-for --> |
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 linter doesn't usually yell at us about label-has-for
. I think it's doing so here because it doesn't understand that <flatpickr>
is really an <input>
element. As long as the <label>
wraps the <input>
, we shouldn't need for
.
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 have removed the for
attribute and add a rule in eslintrc so that it recognizes flatpickr
as a control component.
<!-- Specifying @mousedown.prevent so that clicking the select element does | ||
not show a menu with the placeholder option. This approach seems to work | ||
across browsers. --> | ||
<select :id="toggleId" ref="toggle" class="form-control" | ||
:class="{ none: modelValue?.length === options?.length }" |
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.
:class="{ none: modelValue?.length === options?.length }" | |
:class="{ none: defaultToAll && modelValue?.length === options?.length }" |
If defaultToAll
is false
(the default), then the user can actually uncheck all options. In that case, modelValue.length === 0
. All and none are only the same if defaultToAll
is true
.
@@ -133,6 +137,10 @@ const props = defineProps({ | |||
type: String, | |||
required: true | |||
}, | |||
hideLabel: { |
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 section of props is about customizing text, so I'd put this prop somewhere else. Maybe nearby the disabled
prop?
@analyze="analyze.show()"/> | ||
<entity-download-button | ||
:aria-disabled="deleted" | ||
v-tooltip.aria-describedby="deleted ? $t('downloadDisabled') : null"/> |
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 the message for downloadDisabled
needs to be moved from EntityList
. You can use @transifexKey
to prevent the message from being retranslated after it's moved.
import { apiPaths } from '../../util/request'; | ||
import { useI18nUtils } from '../../util/i18n'; | ||
import { useRequestData } from '../../request-data'; | ||
|
||
const props = defineProps({ |
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.
It doesn't look like DatasetEntities
passes an odataFilter
prop to this component anymore. If the component doesn't use the prop anymore, it could remove the prop. But it sounds to me from the release criteria that the component does need the prop:
- Except if I have an active filter then above the checkboxes I should see a dropdown with two options:
- Download # submissions matching the filter
- Download all # submissions
<odata-data-access :analyze-disabled="analyzeDisabled" | ||
:analyze-disabled-message="analyzeDisabledMessage" | ||
@analyze="analyzeModal.show()"/> | ||
<submission-download-button :form-version="form" |
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 wondering if we could leave the download button in SubmissionList
, but make it teleport here. Then the button would still be able to communicate with the download modal easily. Also, we wouldn't need to copy the downloadDisabled
message here.
Just an idea!
One other thing that the release criteria mention is:
|
Closes getodk/central#824
What has been done to verify that this works as intended?
Manual verification.
Why is this the best possible solution? Were any other approaches considered?
Most of it is HTML/CSS changes. Though not specified in the release criteria, I have made the similar changes on Audits page.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
No
Does this change require updates to user documentation? If so, please file an issue here and include the link below.
No
Before submitting this PR, please make sure you have:
npm run test
andnpm run lint
and confirmed all checks still pass OR confirm CircleCI build passes