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

Check settings versus docs & schema #163

Open
Jay-o-Way opened this issue Sep 14, 2024 · 4 comments
Open

Check settings versus docs & schema #163

Jay-o-Way opened this issue Sep 14, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Jay-o-Way
Copy link
Contributor

Jay-o-Way commented Sep 14, 2024

Compare https://raw.githubusercontent.com/U-C-S/Hurl/main/Utils/UserSettings.schema.json
What I found:

Background type (enum) missing "none" "solid"

        "BackgroundType": {
          "type": "string",
          "description": "The type of background to use for the browser window. mica or acrylic.",
          "enum": ["mica", "acrylic"]

Rule prefixes: a prefix is expected, "no prefix" is not valid. However, according to docs, a prefix may be omitted to imply "string".

          "Rules": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The URL pattern prefixed with s$, g$, r$ or d$, followed by the pattern to match. s$ = simple string, g$ = glob, r$ = regex, d$ = domain.",
              "pattern": "^(s\\$|g\\$|r\\$|d\\$).*"
            }
Rule Type Format Example
String s$__your_rule__ or __your_rule__ https://github.com/U-C-S

Window minwidth and minheight

According to the docs, default size is 420×210. MainWindow properties are defined as:

    MinWidth="460"
    MinHeight="230"
@Jay-o-Way Jay-o-Way changed the title Check _schema_ to match (latest) settings Check settings versus docs & schema Sep 14, 2024
@U-C-S U-C-S added documentation Improvements or additions to documentation good first issue Good for newcomers labels Sep 23, 2024
@Jay-o-Way
Copy link
Contributor Author

Do we know of more inconsistencies?

@U-C-S
Copy link
Owner

U-C-S commented Oct 9, 2024

Yeah, These 2 cases are the only inconsistencies as far as I know. I just left them as it is earlier before having the Settings UI to decide whether it should as it in the schema or as it in the code.

s$your_rule or your_rule

Both should be valid, so the schema's regex should be updated

missing "none"

none currently doesn't work in the UI anyway, but want to support it in the future. we can leave the this as it is

@Jay-o-Way
Copy link
Contributor Author

Jay-o-Way commented Oct 9, 2024

Let's collect the correct data here:

  • Background type: Adding "solid" to the enum is simple. Off-topic:
    • Should mica or acrylic be the default?
  • Prefix: The best way to specify in RegEx that a prefix may be omitted is (...)?
  • Minimum size: I think the code is leading, so 460 x 230

@U-C-S
Copy link
Owner

U-C-S commented Oct 9, 2024

mica is the default (acrylic has issues, i dont know if they still exist in newer versions of wpf-ui)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants