8000 Make Document and Decoration serializables by jperedadnr · Pull Request #312 · gluonhq/rich-text-area · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make Document and Decoration serializables #312

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

Merged
merged 1 commit into from
May 6, 2024

Conversation

jperedadnr
Copy link
Collaborator

Fixes #297

try {
return Color.web(color);
} catch (Exception e) {
return defaultColor;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't a log entry explain here what was being parsed? I can imagine users wondering why they select RED and are returned with the defaultColor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Color::web admits different formats for colours, like "#ff0000" or "0xff0000" or red or rgb(255,0,0), (see https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/java/javafx/scene/paint/Color.java#L288).

But if there are typos or not valid strings, like unknown colours, there would be an IllegalArgumentException exception, and that would be avoided by using a default colour.

@johanvos
Copy link
Contributor
johanvos commented May 2, 2024

Looks good, 1 remark.
Apart from that, this is good to go but we should do a release first, and bump the version before we merge this.

@jperedadnr jperedadnr merged commit 768cb64 into gluonhq:main May 6, 2024
1 check passed
@jperedadnr jperedadnr deleted the 297-serializable branch May 6, 2024 10:25
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.

Open & Save options
2 participants
0