Skip to content

Fix IDE on empty repo

Paul Slaughter requested to merge 27915-fix-ide-empty-repo into master

What does this MR do?

This MR fixes the IDE assumption that the repo is not empty. Previously we did this at a top-level action, but this kept part of the Vuex state from being initialized. This MR takes that approach of letting the low-level actions (i.e. getBranchData) be more robust.

Screenshots

Before (on `master) After (in this MR)
20200402_ide_empty_before 20200402_ide_empty_works

Follow-up issues

This MR fixes some issues, but there are still some preexisting issues to take care of before we can show the IDE button on an empty project.

Description Screenshot
🐛 #213338 (closed) After the initial commit, the local state isn't updated properly so the default branch is treated as non-commitable. It works if you refresh the page. Screen_Shot_2020-04-02_at_5.41.43_PM
🐛 #213581 (closed) If you visit the IDE for an empty project without being able to push code, we should probably show a helpful message explaining that you won't be able to do anything... Screen_Shot_2020-04-03_at_8.58.38_AM

Does this MR meet the acceptance criteria?

Conformity

Closes #27915 (closed)

Edited by Paul Slaughter

Merge request reports