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

Feat/questionnaire load version #892

Merged
merged 5 commits into from
Jan 6, 2025
Merged

Conversation

chloe-renaud
Copy link
Contributor

No description provided.

@chloe-renaud chloe-renaud marked this pull request as ready for review January 3, 2025 16:11
<span>{dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss')}</span>
</div>
<div className="first-letter:uppercase text-slate-400">
<span className="italic" title={dayjs(timestamp).format('LLLL')}>
{dayjs(timestamp).fromNow()},
</span>{' '}
par <span>{author}</span>
par{' '}
<a href={`https://trombi.insee.fr/${author}`} target="_blank">
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really fan to have a hard-coded link.

Copy link
Contributor Author

@chloe-renaud chloe-renaud Jan 6, 2025

Choose a reason for hiding this comment

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

True. I was lazy to add a new env var.

<span>{dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss')}</span>
</div>
<div className="first-letter:uppercase text-slate-400">
<span className="italic" title={dayjs(timestamp).format('LLLL')}>
{dayjs(timestamp).fromNow()},
</span>{' '}
par <span>{author}</span>
par{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have a translated text here (i did not notice this before :-p)

}: Readonly<ConfirmInlineProps>) {
return (
<span className="text-lg">
<span className="align-middle">{Dictionary.confirmQuestionMessage}</span>{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

After almost every div you add a {' '} for adding space. Don't you prefer to add margin ?

Copy link
Contributor Author

@chloe-renaud chloe-renaud Jan 6, 2025

Choose a reason for hiding this comment

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

That's added by Prettier. It's for when there is a space between two span elements separated by a new line. It has nothing to do with margins.

e.g.

I like spaghettis

is the same as

I like{' '}
spaghettis

Copy link
Contributor

Choose a reason for hiding this comment

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

ok thanks, I never saw that 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

just a UI detail : the inline confirm seems to be really small compared to the rest of the versionDetail (particularly the check/xmark that are hard to click on)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was on purpose since it is an action that won't be used too much but we can change the style later on if it proves to be too annoying.

<button className="btn-white" onClick={() => setConfirmLoad(true)}>
{Dictionary.load}
</button>
{confirmLoad ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you never set confirmLoad when trying to load another version (you can display the confirm component on every versions). Is this done on purpose ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit more tricky to do so I thought it was good enough for now. Especially since we want to move the version thing into a tab instead of a modal (if we make the ui more modern) so we won't need this anymore in the long run. since we'll be able to confirm it through a modal.

(I decided to go for the inline confirm for now because I didn't like to open a modal in a modal...)

@chloe-renaud chloe-renaud merged commit 71c5718 into 1.7 Jan 6, 2025
8 checks passed
@chloe-renaud chloe-renaud deleted the feat/questionnaire-load-version branch January 6, 2025 15:47
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.

2 participants