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

Feature/#413 time picker does not accept inline editing #478

Merged

Conversation

manugallegob
Copy link
Collaborator

No description provided.

};

export const setTime = (csvData: string[]) => {
let [hora, minutos] = csvData;
Copy link
Member

Choose a reason for hiding this comment

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

Can you name the varables in english ;)

hora > '23' ||
minutos.length !== 2 ||
minutos === '' ||
minutos > '59'
Copy link
Member

Choose a reason for hiding this comment

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

Avoid magic numbers in code, creat on top of the file, something like:

const MAX_DIGITS = 2;
const MAX_HOURS= '23';
const MAX_MINUTES = '59'

if (csvData.length < 2) {
return true;
}
if (csvData[0] !== 'hh' || csvData[1] !== 'mm') {
Copy link
Member

Choose a reason for hiding this comment

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

Same here

const HOUR_MASK = 'hh';
const MINUTES_MASK='mm';

clockIcon.src = clockIconSrc;

return (
<Group {...commonGroupProps} {...shapeProps}>
Copy link
Member

Choose a reason for hiding this comment

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

@deletidev can you check if we have alreaday some const values to apply?

Copy link
Collaborator

@deletidev deletidev Oct 25, 2024

Choose a reason for hiding this comment

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

On svg, the font family need to be change to font-family="Comic Sans MS, Balsamiq Sans, cursive", .
Here on all Text, fontFamily={INPUT_SHAPE.DEFAULT_FONT_FAMILY}, you may need to update spacing,
strokeWidth={INPUT_SHAPE.DEFAULT_STROKE_WIDTH}, and it is posible, control the size like on the existing input:
Captura de pantalla 2024-10-25 a las 19 41 00

Take a look to the input-shape.tsx.

@brauliodiez brauliodiez merged commit ce8e9fc into dev Oct 30, 2024
2 checks passed
@brauliodiez brauliodiez deleted the feature/#413-Time-Picker-does-not-accept-inline-editing branch October 30, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants