Skip to content

Enable hyperlinks in in-tool Help field #3579

Closed

Description

@allanaaa

The expressions editor window includes a Help tab that has some plain-text information about each variable and function.

display3

I am editing this text right now to match the user manual. I'd like the fields to render with links (they currently just have full URLS that users can copy-paste).

If you look into the code, you'll find that the function files themselves support the Help entries, for example for cross():

@Override
public String getDescription() {
    return "Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. " +
            "The first argument will be interpreted as cell.value if set to cell. " +
            "The second argument will be interpreted as the current project name if omitted or set to \"\". " +
            "The third argument will be interpreted as the index (starts from 0) column if omitted or set to \"\"";
}

@Override
public String getParams() {
    return "cell or value, string projectName (optional), string columnName (optional)";
}

@Override
public String getReturns() {
    return "array";
}

Proposed solution

Render these text entries with hyperlinks, somehow! Whether it's simple HTML or markdown or what-have-you, I can work with it.

Activity

  1. added
    Type: Feature RequestIdentifies requests for new features or enhancements. These involve proposing new improvements.
    Status: Pending ReviewIndicates that the issue or pull request is awaiting review by project maintainers or collaborators
    Good First IssueIndicates issues suitable for newcomers to design or coding, providing a gentle introduction.
    on Feb 4, 2021
  2. sarahelshabrawy commented on Feb 4, 2021

    @sarahelshabrawy
    Contributor

    I would like to help with this issue

  3. wetneb commented on Feb 4, 2021

    @wetneb
    Member

    Thanks! Note that there will be a few design decisions to do on this issue, so perhaps it's worth discussing your approach here before opening a pull request, to make sure we agree on the direction.

  4. added
    expression languageSupport for scripting languages (GREL, Python…)
    Module: FrontendThese issues involve working on HTML, CSS, and JavaScript code that affects the user interface.
    grelThe default expression language, GREL, could be improved in many ways!
    and removed
    Status: Pending ReviewIndicates that the issue or pull request is awaiting review by project maintainers or collaborators
    expression languageSupport for scripting languages (GREL, Python…)
    on Feb 5, 2021
  5. sarahelshabrawy commented on Feb 10, 2021

    @sarahelshabrawy
    Contributor

    So my approach is to delete the String URL reference from all translation .json files and add an anchor tag in expression-preview-dialog class to stand for all languages, Another change is to replace .text() with .html() in order to render the html content of the String of the table cell
    Below is a screenshot of the link rendered
    image
    Is that okay ?
    As for the other link I have a question about it.

  6. wetneb commented on Feb 10, 2021

    @wetneb
    Member

    I think allowing HTML in translations is a sensible way to go. Since we review the translation updates as pull requests we can consider these strings as trusted. Allowing HTML markup could be an opportunity to style code samples more nicely (such as row.index instead of 'row.index').

  7. sarahelshabrawy commented on Feb 10, 2021

    @sarahelshabrawy
    Contributor

    I agree, I will go with that approach then and create a pull request.

  8. NikitaEmberi commented on Feb 15, 2021

    @NikitaEmberi

    Hey, I am new to open source contribution. I see even though @sarahelshabrawy has issued a pull request, there were merge conflicts. This issue seems like something I could work on. I am not sure if @sarahelshabrawy is already working on it, can I also try for the same issue?

  9. tfmorris commented on Feb 16, 2021

    @tfmorris
    Member

    @NikitaEmberi The issue is still assigned to them and the last activity was only a few days ago. Please choose an issue which isn't assigned to anyone.

  10. sarahelshabrawy commented on Feb 17, 2021

    @sarahelshabrawy
    Contributor

    I solved the conflicts I had.
    I opened a new PR and I'm waiting for a review.

  11. linked a pull request that will close this issueEnable hyperlinks in in-tool Help field #3579 #3648on Feb 20, 2021
  12. added this to the 3.5 milestone on Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Good First IssueIndicates issues suitable for newcomers to design or coding, providing a gentle introduction.Module: FrontendThese issues involve working on HTML, CSS, and JavaScript code that affects the user interface.Type: Feature RequestIdentifies requests for new features or enhancements. These involve proposing new improvements.grelThe default expression language, GREL, could be improved in many ways!

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions