Skip to content

Commit

Permalink
feat: adiciona tooltips aos checkboxes de compartilhamento
Browse files Browse the repository at this point in the history
Principais adições:

Suporte a tooltips no componente inputCheckBox
Textos explicativos para cada opção de compartilhamento
Traduções em PT-BR, EN-US e ES-ES
Mantém consistência com o sistema de internacionalização
Melhora experiência do usuário com feedback visual
O código está bem estruturado e segue os padrões do projeto.
  • Loading branch information
LeonardoConstantino committed Nov 10, 2024
1 parent f93d89d commit e759b0b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/inputCheckBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const getInputCheckBox = (
checked = false,
className = '',
id = '',
title = '',
onChangeHandler = null
) => {
if (!onChangeHandler || typeof onChangeHandler !== 'function') {
Expand All @@ -36,6 +37,7 @@ export const getInputCheckBox = (

const label = getComponent('label', getTextSpan(textContent), input);
label.props.class = `label-input-checked ${className}`;
if (title) label.props.title = title;
if (id) label.props.for = id;

return label;
Expand Down
3 changes: 3 additions & 0 deletions src/layout/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const checkBoxPriority = getInputCheckBox(
false,
'',
'shareCheckBoxPriority',
getText(getLang(), 'labels.tolTipCheckBoxShare', 'Prioridades'),
shareOptionsHandler
);

Expand All @@ -46,6 +47,7 @@ const checkBoxCompleted = getInputCheckBox(
false,
'',
'shareCheckBoxCompleted',
getText(getLang(), 'labels.tolTipCheckBoxShare', 'Status'),
shareOptionsHandler
);

Expand All @@ -55,6 +57,7 @@ const checkBoxCreatedAt = getInputCheckBox(
false,
'',
'shareCheckBoxCreatedAt',
getText(getLang(), 'labels.tolTipCheckBoxShare', 'Data de criação'),
shareOptionsHandler
);
const textContent = getComponent('code');
Expand Down
3 changes: 3 additions & 0 deletions src/services/dialogHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const texts = {
labels: {
taskList: '📋 Lista de Tarefas',
delete: 'Excluir 🗑️',
tolTipCheckBoxShare: (tip)=> `Selecione o que exibir no compartilhamento: ${tip}`,
},
infos: {
sizeInfo: 'Os tamanhos são aproximados e podem variar. 🗂️',
Expand Down Expand Up @@ -206,6 +207,7 @@ const texts = {
labels: {
taskList: '📋 Task List',
delete: 'Delete 🗑️',
tolTipCheckBoxShare: (tip)=> `Select what to display in the share: ${tip}`,
},
infos: {
sizeInfo: 'The sizes are approximate and may vary. 🗂️',
Expand Down Expand Up @@ -316,6 +318,7 @@ const texts = {
labels: {
taskList: '📋 Lista de Tareas',
delete: 'Eliminar 🗑️',
tolTipCheckBoxShare: (tip)=> `Selecciona qué mostrar en el compartido: ${tip}`,
},
infos: {
sizeInfo: 'Los tamaños son aproximados y pueden variar. 🗂️',
Expand Down

0 comments on commit e759b0b

Please sign in to comment.