The ProjectIcon component should accept an image prop, or figure out its image internally

Created on 29 January 2025, 3 months ago

Problem/Motivation

The ProjectIcon component has a type prop, but as of 🐛 The styling of the new installed button is not inline in light and broken in dark mode Active it's really not flexible enough for our purposes. Its image shouldn't be determined by the type, but should be passed in (or otherwise resolved internally based on something else).

In any event, we really need to remove the greenType value, since that's clearly a leaky abstraction, and maybe handle the dark-mode image generically.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

  • Issue created by @phenaproxima
  • 🇺🇸United States phenaproxima Massachusetts
  • First commit to issue fork.
  • 🇮🇳India utkarsh_33

    I'll work on this.

  • Pipeline finished with Failed
    3 months ago
    Total: 473s
    #413053
  • Pipeline finished with Failed
    3 months ago
    Total: 398s
    #413057
  • Pipeline finished with Failed
    3 months ago
    #413088
  • Pipeline finished with Success
    3 months ago
    Total: 484s
    #413116
  • 🇮🇳India utkarsh_33

    This is ready for a review.

  • Merge request !705Do this a little differently → (Closed) created by phenaproxima
  • Pipeline finished with Success
    3 months ago
    Total: 3171s
    #413645
  • 🇮🇳India utkarsh_33

    @phenaproxima i merged the changes that you intended to into my existing MR.It's in a working state.I would request you to review the changes and maybe close the MR that you opened.
    Thanks!

  • Pipeline finished with Success
    3 months ago
    Total: 515s
    #414269
  • 🇺🇸United States phenaproxima Massachusetts

    Closed my MR, I agree we should only proceed with one.

    But that said...what is the benefit of changing this so dramatically? The internal list of alt texts and image sources was, I think, actually a good design; forcing the parent components to pass all the props in makes more work for them, increases brittleness, and means ProjectIcon no longer adds much value.

    I really like the idea of being able to do something like <ProjectIcon type="installed" /> and let it internally figure out how to display it. I just didn't want greenInstalled to be a valid type, because that's a leaky abstraction. "Should it be green or not" should be totally internal to ProjectIcon, which is what your MR implements, but at the cost of making the components think about all the other details too.

    Can we change direction here and go back mostly to what we had, which was largely good, and just remove greenInstalled as a legitimate type value for ProjectIcon?

  • Pipeline finished with Canceled
    3 months ago
    Total: 186s
    #417513
  • Pipeline finished with Failed
    3 months ago
    Total: 450s
    #417516
  • Pipeline finished with Success
    3 months ago
    Total: 416s
    #417526
  • 🇮🇳India utkarsh_33

    If we want to follow the approach that you suggested then i have made the changes accordingly.marking it NR again.

  • 🇺🇸United States phenaproxima Massachusetts

    That looks great but I think there's one small bug...

  • 🇺🇸United States phenaproxima Massachusetts

    Fixed my points.

  • Pipeline finished with Success
    3 months ago
    Total: 500s
    #417938
  • 🇺🇸United States phenaproxima Massachusetts

    No code objections anymore, and I didn't do much alteration on this patch, so I'm marking it tentatively RTBC.

  • Pipeline finished with Skipped
    3 months ago
    #418221
  • First commit to issue fork.
  • 🇺🇸United States chrisfromredfin Portland, Maine

    much clean. very amaze. still references to gin in there directly, of course, but that's for another day... this gets us there.

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

  • Pipeline finished with Failed
    about 2 months ago
    Total: 1208s
    #433729
  • Pipeline finished with Success
    about 2 months ago
    Total: 2528s
    #433797
Production build 0.71.5 2024