amelioration(review): tech review
Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
parent
0caacdaf59
commit
b539fe1b65
5 changed files with 7 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
exclude:
|
exclude:
|
||||||
- 'app/assets/stylesheets/reset.scss'
|
- 'app/assets/stylesheets/reset.scss'
|
||||||
- 'app/assets/stylesheets/direct_uploads.scss'
|
- 'app/assets/stylesheets/direct_uploads.scss'
|
||||||
- 'app/assets/stylesheets/dsfr.scss'
|
- 'app/assets/stylesheets/dsfr_override.scss'
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
BangFormat:
|
BangFormat:
|
||||||
|
|
|
@ -33,12 +33,9 @@ trix-editor.fr-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fr-autocomplete {
|
.fr-autocomplete {
|
||||||
// override dsfr chevron down which is
|
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z'%3E%3C/path%3E%3C/svg%3E");
|
||||||
// --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z'></path></svg>");
|
|
||||||
// use a magnifier instead
|
|
||||||
--data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 24 24' ><path fill='%23161616' d='M12,13.1l5-4.9l1.4,1.4L12,15.9L5.6,9.5l1.4-1.4L12,13.1z'/></svg>");
|
|
||||||
background-image: var(--data-uri-svg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,6 @@ class Dsfr::ComboboxComponent < ApplicationComponent
|
||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
def hidden_html_options
|
|
||||||
@hidden_html_options || {}
|
|
||||||
end
|
|
||||||
|
|
||||||
def input_id
|
def input_id
|
||||||
@input_html_options[:id]
|
@input_html_options[:id]
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
.fr-ds-combobox-input
|
.fr-ds-combobox-input
|
||||||
%input{ value: selected_option_label_input_value, **html_input_options }
|
%input{ value: selected_option_label_input_value, **html_input_options }
|
||||||
- if form
|
- if form
|
||||||
= form.hidden_field name, value: selected_option_value_input_value, form: form_id, **hidden_html_options
|
= form.hidden_field name, value: selected_option_value_input_value, form: form_id, **@hidden_html_options
|
||||||
- else
|
- else
|
||||||
%input{ type: 'hidden', name: name, value: selected_option_value_input_value, form: form_id, **hidden_html_options }
|
%input{ type: 'hidden', name: name, value: selected_option_value_input_value, form: form_id, **@hidden_html_options }
|
||||||
.fr-menu
|
.fr-menu
|
||||||
%ul.fr-menu__list.hidden{ role: 'listbox', hidden: true, id: list_id, data: { turbo_force: :browser, options: options_json, url:, hints: hints_json }.compact }
|
%ul.fr-menu__list.hidden{ role: 'listbox', hidden: true, id: list_id, data: { turbo_force: :browser, options: options_json, url:, hints: hints_json }.compact }
|
||||||
.sr-only{ aria: { live: 'polite', atomic: 'true' }, data: { turbo_force: :browser } }
|
.sr-only{ aria: { live: 'polite', atomic: 'true' }, data: { turbo_force: :browser } }
|
||||||
|
|
|
@ -12,6 +12,7 @@ export class AutosubmitController extends ApplicationController {
|
||||||
declare readonly submitterTarget: HTMLButtonElement | HTMLInputElement;
|
declare readonly submitterTarget: HTMLButtonElement | HTMLInputElement;
|
||||||
declare readonly hasSubmitterTarget: boolean;
|
declare readonly hasSubmitterTarget: boolean;
|
||||||
declare readonly inputTarget: HTMLInputElement;
|
declare readonly inputTarget: HTMLInputElement;
|
||||||
|
declare readonly hasInputTarget: boolean;
|
||||||
|
|
||||||
#dateTimeChangedInputs = new WeakSet<HTMLElement>();
|
#dateTimeChangedInputs = new WeakSet<HTMLElement>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue