Skip to content

Unexpected behavior around the lastCommitMsg and isCompact

From @cwoolley-gitlab's comment on !21067 (merged):

I'm seeing some unexpected behavior after this commit around the lastCommitMsg and isCompact. This occurs on this commit (bc303216fdf) but not on the previous commit (c8af18ef2a6)

To reproduce:

  1. Open the Web IDE for some repo on which you have permission to commit to master.
  2. Make sure your window is taller than MAX_WINDOW_HEIGHT_COMPACT = 750
  3. Modify a file
  4. Click the "commit" tab in the left sidebar.
  5. (if you are on the previous commit) stage the change.
  6. Enter a commit message
  7. Select "Commit to master branch"
  8. Click "Commit"
  9. You will return to the "Edit" tab (commit message is gone, commit is successful)
  10. You will temporarily see a message like "Successful commit. All changes are committed...Your changes have been committed. Commit 8c0fb422 with 1 additions, 1 deletions." (this is the lastCommitMsg.
  11. Then the message disappears

Expected

  1. After the lastCommitMsg disappears, the commit area slides down, and only shows a disabled "Commit" button and message "0 unstaged and 0 staged changes"

Actual

  1. After the lastCommitMsg disappears, the un-compact commit form reappears, with the commit message text area, master/branch radio buttons, and "Stage & Commit"/"Collapse" buttons.

FYI, I found this while trying to rebase/reconcile these changes with !21010 (comment 272731415).

Also, as a heads up, I see inconsistent behavior when exploring this in local GDK. Sometimes, when clicking the commit tab after making a change, the commit form is compact when it shouldn't be. But I've never been able to reproduce it while debugging to figure out why.