API v2.0
Breaking changes for API v2.0
Here is a list of breaking changes that happened during the API v2.0 period when differing versions of Terminaux introduced breaking changes.
From 1.12.x to 2.0.x
Between the 1.12.x and 2.0.x version range, we've made the following breaking changes:
Removed Terminaux.Figgle
Terminaux.FiggleFiggle was not maintained by the original developer for a long time, so we've forked this library to create Figletize, and its documentation can be found here:
Figletize - ManualRemoved the old color wheel
The old color wheel wasn't updated to benefit from the latest Terminaux improvements, so we had to remove the old color wheel to reduce the maintenance burden.
Implemented a proper console wrapper
public static class ConsoleWrappersA proper console wrapper was needed to effortlessly call the console wrapper functions that Terminaux uses to delegate the Console functions so that appropriate writing methods are used. This is done in an attempt to achieve consistency in behavior across all the Terminaux functions.
Although the action-based console wrappers can still be set, you can no longer call them from your application. Instead, you must use the newer ConsoleWrapper class to more accurately represent the properties and the functions and to avoid confusion.
Textify is used for VT sequence feature
Since Textify was released as a brand new library for .NET, which was a library that moved all text-related tools from various libraries of our own, we've decided to move these classes to Textify, removing them from Terminaux entirely. This is to allow diversity of development for the two libraries and to allow interoperability.
Moved Inputs to the root namespace
Inputs to the root namespaceInputs hosted several of the input tools to allow you to ask users a question in several of the forms, including the selection choices, the modal infoboxes, and so on.
However, we've moved the entire Inputs namespace to Terminaux.Inputs as it just uses the console reader that Terminaux implements and not modifies it.
Figlet selector moved to Inputs.Styles
Inputs.StylesSince the legacy Figlet code has been removed from Terminaux and the figlet selector was considered as an input method to select a Figlet font, we've decided to move the figlet selector to Inputs.Styles. This is to allow better organization.
Removed ColorSeqException
ColorSeqExceptionColorSeq was replaced by Terminaux, because the latter library works on managing your terminal applications by providing you several of the nice terminal tools, such as the efficient management of colors, input reading, and much more.
We've removed ColorSeqException as an internal class, but we need to put this change here to tell the developers that they can finally handle the Color errors easily by catching all TerminauxException errors.
ConsolePlatform's NewLine
ConsolePlatform's NewLineFrom now on, this property has been removed as it isn't used except the console checker. Also, the usage of Textify in the v2.0 version of Terminaux means that you need not to resort to cryptic hacks to get the new lines working properly.
Relocated color model conversion tools
The color model conversion tools have been reworked to become easier to use than the Terminaux v1.x version series, which use constructors that do the conversion. It was discovered that it was not so easy to maintain, so we've decided to relocate these to their own dedicated classes, such as CMY conversion tools (CmyConversionTools), so that they can be used by Terminaux v2.0 applications.
They are also titled appropriately so that you can better understand what is the source and what is the target unit being used to convert the source color model to. More documentation is found in its appropriate page.
Reworked transformation method switch
The above switch doesn't explain the motive of enabling or disabling except "simple," which means a simple way of transforming the color. However, it doesn't explain what formula does Terminaux use unless you use the API documentation.
So, we've decided to remove this and replace it with the TransformationMethod enumeration to make things more clear.
Removed IsDark/Bright for ConsoleColorsInfo
IsDark/Bright for ConsoleColorsInfoWe've removed IsDark/Bright for the above class because they are just repeat properties for the color brightness that the Color instance would have exposed properly, so we've decided to replace it with a Color property to get access to such flag.
Renamed color blindness type
We've renamed the color blindness deficiency type enumeration to better represent the type of formula that is going to be used. This is to allow more formulas to be more accurately represented.
Initially, it was touted to be a color deficiency type of either protan, deutan, or tritan. However, more color transformation formulas were added, such as monochromacy and inverted, which is why we've renamed the color blindness type to TransformationFormula.
From 2.0.x to 2.1.x
Between the 2.0.x and 2.1.x version range, we've made the following breaking changes:
Titled variants of infoboxes merged
The titled variants of all informational box types have been moved to a completely different place, which is their parent class, like InfoBoxColor. This ensures that maintenance is not a burden when it comes to maintaining them.
We've also done a refactor so that the infobox code occurs only once to reduce the amount of bugs and regressions that may emerge when updating related code.
Border and box frame color writers refactored
When we wanted to make the titled borders and box frames, we wanted to make titled informational boxes. However, after making several types of informational boxes and their titled variants, we've discovered that there were a lot of repeated code for different situations.
So, we've decided to do the same thing to the two classes as we've done to the infoboxes in the past release; condense them to a single class and refactor them to reduce the maintenance burden.
Specifier parser function signature changed
In completion of the specifier parser implementation and refactoring, we've decided to change the signature of this function to satisfy the recent changes done to various parsing functions, thus further simplifying the Color constructor to its bare minimum.
Implemented color settings class
For simplification of the color management code, instead of using the color tools as a state machine, we need to actually make this part of Terminaux settings-agnostic to reduce complications related to this part.
As a result, we had to spray the settings argument everywhere to allow Terminaux programs to either set their own settings for colors when making a new color instance or to use the global settings that can be manipulated with by the user program.
From 2.1.x to 2.2.x
Between the 2.1.x and 2.2.x version range, we've made the following breaking changes:
Removed non-standalone char write wrapper
The non-standalone character writer wrapper has been removed because the terminal reader doesn't make any use of it as part of the recent refactors that were done in the 2.0.0 development cycle. This resulted in this character writer being useless.
So, we've removed this wrapper as a result to reduce complexity.
Highlighted text writer moved
The highlighted text writer has been moved to its own class to reduce complexity and allow for simplicity. This reduces the maintenance burden for future Terminaux releases.
Also, we've made changes as to how to handle color resetting at the end of the write so that your app doesn't have to manually call the ResetColors() function.
From 2.2.x to 2.4.x
Between the 2.2.x and 2.4.x version range, we've made the following breaking changes:
Color contrast class added
We've moved the IsSeeable function as part of the addition of the color contrast tools to the ColorContrast static class so that it becomes part of the color contrast tools.
Moved ConsoleColors[Info] to Colors.Data
We've moved the two classes, ConsoleColors and its associated Info class, to Terminaux.Colors.Data as they're part of the console colors information gathering for both 16-color and 256-color information.
From 2.4.x to 2.5.x
Between the 2.4.x and 2.5.x version range, we've made the following breaking changes:
YIQ values changed
The values in the YIQ color model have been changed to store natural integer numbers that range from 0 to 255 instead of the more-accurate double-precision floating system. This is to shorten the specifiers for the YIQ values. The three values used to hold the following ranges:
Luma:
0.0->0.1In-phase:
-0.5957->0.5957Quadrature:
-0.5226->0.5226
Moved X11-related functions to ConversionTools
ConversionToolsThese functions used to reside on ColorTools before they're moved to ConversionTools, which is a new class that Terminaux 2.5.0 introduced. ConversionTools was meant to hold general color conversion tools.
Moved RenderColorBlindnessAware()
RenderColorBlindnessAware()The RenderColorBlindnessAware function got implemented during Terminaux 1.x to simplify making new Color instances with the color blindness (or transformation) applied according to the manually-selected color transformation formula and their options.
This function, however, has been moved to TransformationTools instead of ColorTools to more accurately describe the purpose of this function.
Removed obsolete functions
These three obsolete functions became obsolete when better solutions were implemented during the whole Terminaux development lifetime, which resulted in properties like Color's Hex and PlainSequence dynamically returning appropriate values according to the specified specifier.
From 2.5.x to 2.6.x
Between the 2.5.x and 2.6.x version range, we've made the following breaking changes:
Removed R, G, and B properties (and normalized) from Color
ColorTo simplify the Color class, we've removed the above properties as they wrap against the RGB property, which contains the above properties. This is also done to achieve consistency.
From 2.6.x to 2.7.x
Between the 2.6.x and 2.7.x version range, we've made the following breaking changes:
ReadKeyTimeout() no longer throws a removed exception
ReadKeyTimeout() no longer throws a removed exceptionReadKeyTimeout() no longer throws above exception when the user didn't press any key in the timely manner. Instead, it returns a default ConsoleKeyInfo instance (that indicates that there is no key to be pressed) with a boolean variable in the same return type as a tuple that indicates whether a key has been pressed or not.
However, as the above exception wasn't used anymore by Terminaux itself, we've decided to remove it, leaving only the TerminauxException class being used.
Button infoboxes now handle choice info
The button infoboxes now handle the choice info instead of simple string array of buttons, making these infoboxes more flexible than before. On the contrary, we had to change the signature of all the functions found inside InfoBoxButtonsColor to hold the InputChoiceInfo array that stores all the possible choices.
Last updated