Test SDC conversion script and guide with starshot_demo/components/02-molecules/starshot-card

Created on 14 August 2024, 5 months ago
Updated 20 September 2024, 4 months ago

Problem/Motivation

This issue is for Annmary Sruthy to test the SDC conversion script and the guide using:

  • starshot_demo/components/02-molecules/starshot-card

Steps to reproduce

Proposed resolution

Go through the conversion guide and try to convert the component using the script and report any feedback.

Remaining tasks

  • Review guide
  • Follow guide to use the script
  • Convert starshot_demo/components/02-molecules/starshot-card
  • Report feedback here

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Kristen Pol
  • Assigned to annmarysruthy
  • 🇮🇳India annmarysruthy

    Executed the script using command:

    python3 twig-sdc-yaml-generator/twig_sdc_yaml_generator.py starshot_demo/components/02-molecules/starshot-card

    Result:

    1. New Files starshot-card.component.yml, README.md is generated inside folder starshot_demo/components/02-molecules/starshot-card

    Output Generated

    starshot-card.component.yml

    name: Starshot card
    
    status: experimental
    
    group: Molecules
    
    props:
    
      type: object
      required:
        - summary
        - link
        - image
    
      properties:
        theme:
          type: string
          title: Theme
          description: 'Theme: light, dark.'
          default: light
          enum:
            - light
            - dark
    
        display:
          type: string
          title: Display
          description: 'Card display: vertical, horizontal, centered, overlay.'
          default: vertical
          enum:
            - vertical
            - horizontal
            - centered
            - overlay
    
        title:
          type: string
          title: Title
          description: Card title.
    
        summary:
          type: string
          title: Summary
          description: Card summary.
    
        link:
          type: object
          title: Link
          description: 'Link object:'
          properties: {}
    
    
        background:
          type: string
          title: Background
          description: URL for the background image.
          default: none
    
        tags:
          type: array
          title: Tags
          description: 'Tags array:'
          items:
            type: object
    
            properties:
              type:
                type: string
                title: Type
                description: 'Type: primary, secondary, tertiary'
                default: primary
                enum:
                  - primary
                  - secondary
                  - tertiary
    
              content:
                type: string
                title: Content
                description: Content.
    
              icon:
                type: string
                title: Icon
                description: Icon name.
    
              icon_placement:
                type: string
                title: Icon placement
                description: 'Icon position: before, after.'
                default: before
                enum:
                  - before
                  - after
    
              url:
                type: string
                title: Url
                description: Optional URL to convert to a link.
    
              is_new_window:
                type: boolean
                title: Open in a new window. Only if url is provided.
    
              is_external:
                type: boolean
                title: Link is external.
    
        image:
          type: object
          title: Image
          description: 'Image object:'
          properties: {}
    
    
        attributes:
          type: string
          title: Attributes
          description: Additional attributes.
    
        modifier_class:
          type: string
          title: Modifier class
          description: Additional classes.
    
  • Issue was unassigned.
  • Status changed to Needs review 5 months ago
  • Status changed to Needs work 5 months ago
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Thanks! The link and image issues should be fixed once Anand updates his script or we can manually tweak like above.

    Good catch on the 'drupal' issue. Do you want to create an MR for that one?

  • Pipeline finished with Success
    5 months ago
    Total: 268s
    #262966
  • Pipeline finished with Success
    5 months ago
    Total: 166s
    #262971
  • Status changed to Needs review 5 months ago
  • 🇮🇳India annmarysruthy

    Added a commit for adding drupal in tag.twig. This would fix issue 3 listed in comment #3. Kindly review

  • Status changed to Postponed 5 months ago
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Thanks. Merged in the latest from 1.0.x. Note that these components are getting renamed to "old-x" because of the design changes so holding off on this one until that code is merged in (should be very soon).

  • Pipeline finished with Success
    5 months ago
    Total: 167s
    #265305
  • Status changed to Fixed 4 months ago
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Updated, thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024