-
-
Notifications
You must be signed in to change notification settings - Fork 405
Experiment descriptions #8105
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
base: dev/feature
Are you sure you want to change the base?
Experiment descriptions #8105
Conversation
…to feature/feature-descriptions
src/main/java/org/skriptlang/skript/lang/experiment/Experiment.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff so far
JsonArray description = new JsonArray(); | ||
for (String part : experiment.description().split("\\n")) { | ||
description.add(part); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved inside of the else
below, right?
CATCH_ERRORS("Runtime Error Catching", | ||
"catch runtime errors", | ||
""" | ||
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would remove the pattern syntax from this
private final LifeCycle phase; | ||
private final SkriptPattern compiledPattern; | ||
|
||
Feature(String codeName, LifeCycle phase, String... patterns) { | ||
Feature(@NotNull String displayName, @NotNull String codeName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick but I feel like it makes more sense to have codeName
first
/** | ||
* @return The description for this experiment. | ||
*/ | ||
default @NotNull String description() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a list of strings? I feel like that's the standard, but would like to hear thoughts. Could keep the single string constructor and just split at newlines for simplicity too.
Problem
Currently, experiments have no standardized way of being displayed in docs sites. There's also no easily available description or display name which docs sites can use for displaying.
Solution
Adds an optional description and display name to Experiment.
Testing Completed
Manually checked.
Supporting Information
Completes: none
Related: none