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

Show variable help in edit runtime #5671

Open
ColemanTom opened this issue Aug 8, 2023 · 1 comment
Open

Show variable help in edit runtime #5671

ColemanTom opened this issue Aug 8, 2023 · 1 comment
Milestone

Comments

@ColemanTom
Copy link
Contributor

Problem

There are cases where environment variables are specified in the environment section to help operators change behaviour of a script. In my experience, people tend to add a comment inline to describe these variables.

e.g.

[[[environment]]]
    # Change COMPRESS to "False" to disable compression
    COMPRESS = "True"

Whilst similar information should also appear in support documentation, I think it woud be useful to see it inlined in the Edit Runtime interface so that there is some documentation in the edit runtime interface for easy viewing.

A workaround would be to not use the environment section but rather to embed in *-script areas instead, but that can have its drawbacks if almost every other task has a shared one.

Proposed Solution

I haven't thought this out thoroughly, but, three options can be thought of quickly.

  1. Add a new level under environment
[[[environment]]]
    COMPRESS = "True"
    [[[[description]]]]
        COMPRESS = Change COMPRESS to "False" to disable compression
  1. Don't strip out comments in th environment section but instead ingest them

  2. Add a new comment syntax which can be used in some sections and will then show up in the edit section and is associated automatically with the item it was above.

@oliver-sanders
Copy link
Member

oliver-sanders commented Aug 10, 2023

Of those three, a solution along the lines of (1) would be the most viable. Getting this information into the editRuntime form would be a little trickier as it intruduces cross-referencing which we don't currently do.

An easier to implement alternative would be to implement the comments within the environment variable something like:

[[[environment]]]
    FOO = """
        # some comment
        some-value
    """

These would then appear as part of the environment variable in the edit runtime form without requiring modifications at the UI end. We'dd need some simple internal logic for stripping the comment from the variable.

@oliver-sanders oliver-sanders added this to the some-day milestone Aug 10, 2023
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

No branches or pull requests

2 participants