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

v4.0.0 #585

Merged
merged 42 commits into from
May 28, 2020
Merged

v4.0.0 #585

merged 42 commits into from
May 28, 2020

Conversation

linuswillner
Copy link
Owner

This update brings with it the biggest batch of changes to react-console-emulator since its initial release. Changes include a move to a new location, major restructurations of the repository and the internal logic, a whole bunch of changes, improvements, new features and of course some bug fixes.

Breaking changes

Moved repositories; js-rcon/react-console-emulator is now linuswillner/react-console-emulator!

Renamed noAutomaticStdout prop to noEchoBack for added clarity.

Main changes

Terminal message styling is here! You can now re-style the messages output by the terminal (Including echoes, optionally with the styleEchoBack prop) using the messageStyle and messageClassName props (#518).

JSX prompt labels! Prompt labels now support elements instead of just plain old strings (#210).

Newline parsing is now possible! The terminal can now parse newline characters in terminal messages - anything with a \n character in it will be rendered as a separate line in the response message. This does of course not apply to command back-echoes. This behaviour can also be disabled, if desired, using the noNewlineParsing prop (#519).

Case-insensitive command matching! You can now supply the ignoreCommandCase prop to allow matching commands even when their casing is not correct. Do note that for security reasons, enabling case-insensitive command matching restricts command names to letters, numbers and dashes/underscores (#415).

Other changes

The acceptance of terminal input can now be controlled with a prop. Setting the disabled prop will enable/disable character input to the terminal.

Fixed an extremely long-running bug where, when the history only had one unit in it, the terminal would not correctly reset the input value and would show the same value twice. This has now finally been fixed after having been in the library for over two years.

Completely reworked demo page - the old one was really drab and plain, so I took the time to make it a lot more pretty and informative.

A full run-down of the prop changes is as follows:

- noAutomaticStdout
+ noEchoBack
+ noNewlineParsing
+ ignoreCommandCase
+ styleEchoBack
+ messageStyle
+ messageClassName
+ disabled

Closes #210
Closes #519
Closes #518
Closes #415

@linuswillner linuswillner changed the title Version 4.0.0 v4.0.0 May 28, 2020
@linuswillner linuswillner merged commit 28af860 into master May 28, 2020
@linuswillner linuswillner deleted the v4 branch May 28, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant