• 
      

    Convert RB.CommitView to TS/spina and Ink.

    Review Request #14105 — Created Aug. 15, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    This change converts the CommitView class to TypeScript, and replaces
    various UI elements with Ink. In particular:

    • Several icons have been switched from fontawesome to Tabler icons
      bundled in Ink.
    • The progress spinner when creating a post-commit review request now
      uses <Ink.Spinner>.
    • The confirmation dialog uses <Ink.Dialog>

    This also fixes a couple ugly interaction issues relating to what is
    happening when during the event handler. The big problem was that we
    were always creating the confirmation dialog and then handling other
    cases in the confirm handler. This meant that for commits that had an
    existing review request, we'd prompt them to create a new review request
    and then just open the existing one. For inaccessible commits, we'd
    prompt them and then do nothing. These conditions are now checked at the
    top of the click handler, so we don't prompt the user unless we really
    need to.

    • Ran js-tests.
    • Created new review requests for commits and saw that the interaction
      worked correctly for both confirm and cancel.
    • Clicked on commits with existing review requests and saw that the page
      linked directly without any prompt.
    • Verified the appearance of the new icons and spinner.

    Commits

    Files