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

[Feature Request]: Move UI tooltip code to Swate #432

Closed
Freymaurer opened this issue Jun 14, 2024 · 2 comments
Closed

[Feature Request]: Move UI tooltip code to Swate #432

Freymaurer opened this issue Jun 14, 2024 · 2 comments
Assignees
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature

Comments

@Freymaurer
Copy link
Collaborator

Freymaurer commented Jun 14, 2024

Contact Details

No response

Is your feature request related to a problem?

s

Describe the solution you would like!

type IOType with
    static member getUITooltip(iotype: U2<IOType,string>) =
        match iotype with
        | U2.Case1 Source | U2.Case2 "Source" -> 
            "The source value must be a unique identifier for an organism or a sample." 
        | U2.Case1 Sample | U2.Case2 "Sample" -> 
            "The Sample Name column describes specifc laboratory samples with a unique identifier." 
        | U2.Case1 Data | U2.Case2 "RawDataFile" -> 
            "The Raw Data File column defines untransformed and unprocessed data files."
        | U2.Case1 Data | U2.Case2 "DerivedDataFile" -> 
            "The Derived Data File column defines transformed and/or processed data files."
        | U2.Case1 Data | U2.Case2 "ImageFile" -> 
            "Placeholder"
        | U2.Case1 Material | U2.Case2 "Material" -> 
            "Placeholder" 
        | U2.Case1 (FreeText _) | U2.Case2 "FreeText" -> 
            "Placeholder"
        | _ -> failwith $"Unable to parse combination to existing IOType: `{iotype}`"

Additional context!

No response

Host

Applies to All

Host Details

s

@github-actions github-actions bot added the Status: Needs Triage This item is up for investigation. label Jun 14, 2024
@Freymaurer
Copy link
Collaborator Author

type CompositeHeader with
    // https://fable.io/docs/javascript/features.html#u2-u3--u9
    // U2 is an erased union type, allowing seemless integration into js syntax
    /// <summary>
    /// Can pass header as `U2.Case1 compositeHeader` or `U2.Case2 string` or (requires `open Fable.Core.JsInterop`) `!^compositeHeader` or `!^string`
    /// </summary>
    /// <param name="header"></param>
    static member getUITooltip(header:U2<CompositeHeader,string>) =
        match header with
        | U2.Case1 (Component _) | U2.Case2 "Component" -> 
            "Component columns are used to describe physical components of a experiment, e.g. instrument names, software names, and reagents names."
        | U2.Case1 (Characteristic _) | U2.Case2 "Characteristic" ->
            "Characteristic columns are used for study descriptions and describe inherent properties of the source material, e.g. a certain strain or organism part."
        | U2.Case1 (Factor _)| U2.Case2 "Factor" ->
            "Use Factor columns to describe independent variables that result in a specific output of your experiment, e.g. the light intensity under which an organism was grown."
        | U2.Case1 (Parameter _) | U2.Case2 "Parameter" ->
            "Parameter columns describe steps in your experimental workflow, e.g. the centrifugation time or the temperature used for your assay."
        | U2.Case1 (ProtocolType) | U2.Case2 "ProtocolType" ->
            "Defines the protocol type according to your preferred endpoint repository." 
        | U2.Case1 (ProtocolDescription) | U2.Case2 "ProtocolDescription" ->
            "Describe the protocol in free text."
        | U2.Case1 (ProtocolUri) | U2.Case2 "ProtocolUri" ->
            "Web or local address where the in-depth protocol is stored."
        | U2.Case1 (ProtocolVersion) | U2.Case2 "ProtocolVersion" ->
            "Defines the protocol version."
        | U2.Case1 (ProtocolREF) | U2.Case2 "ProtocolREF" ->
            "Defines the protocol name."
        | U2.Case1 (Performer) | U2.Case2 "Performer" ->
            "Defines the protocol performer."
        | U2.Case1 (Date) | U2.Case2 "Date" ->
            "Defines the date the protocol was performed."
        | U2.Case1 (Input _) | U2.Case2 "Input" ->
            "Only one input column per table. E.g. experimental samples or files."
        | U2.Case1 (Output _) |U2.Case2 "Output" ->
            "Only one output column per table. E.g. experimental samples or files."
        | U2.Case1 (FreeText _) | U2.Case2 "FreeText" ->
            "Placeholder"
        | U2.Case1 (Comment _) | U2.Case2 "Comment" ->
            "Comment"
        | _ -> failwith $"Unable to parse combination to existing CompositeHeader: `{header}`"

@Freymaurer Freymaurer added Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature and removed Status: Needs Triage This item is up for investigation. labels Jun 18, 2024
@Freymaurer Freymaurer self-assigned this Jun 18, 2024
@Freymaurer Freymaurer moved this to Backlog in ARCStack Jun 18, 2024
@Freymaurer Freymaurer added this to the Swate v1.0.0-beta.04 milestone Jun 18, 2024
@Freymaurer
Copy link
Collaborator Author

I think referencing the specification or relevant docs is more elegant so i'll just close this one 🤔

@github-project-automation github-project-automation bot moved this from Backlog to Done in ARCStack Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature
Projects
Status: Done
Development

No branches or pull requests

1 participant