Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Add the option to disable newlines and pre-parse templates #553

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

noxer
Copy link
Contributor

@noxer noxer commented Sep 2, 2022

Summary

In order to present the progress of the import file validation, we need a way to render lines without a newline. Also due to the progress being rendered multiple times per second (on a half decent machine), this PR adds the possibility to pass pre-parsed templates to the printer to avoid overhead.

Ticket Link

MM-38705

@noxer noxer requested review from mgdelacroix and removed request for mgdelacroix September 2, 2022 09:02
@noxer noxer self-assigned this Sep 2, 2022
Copy link
Member

@agnivade agnivade left a comment

Choose a reason for hiding this comment

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

Add a test?

Also curious to know how it replaces the same line? I don't see a curses library being used.

@noxer noxer marked this pull request as ready for review September 2, 2022 15:23
@noxer
Copy link
Contributor Author

noxer commented Sep 2, 2022

[x] Test added
It replaces the same line by printing a \r to return the text cursor at the start of the current line without a line break. So the next line will replace the old one.

@agnivade
Copy link
Member

agnivade commented Sep 2, 2022

Thanks, I was thinking something like that.

@noxer noxer merged commit 3fba246 into master Sep 2, 2022
@noxer noxer deleted the MM-38705-upgrade-printer-for-input-validator branch September 2, 2022 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants