Refactor create_merge_request_dropdown.js
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !83426 (merged) should be addressed:
-
@thomasrandolph started a discussion: (+1 comment) You could condense this a bit with something like this:
this.unavailableButtonText.textContent = isLoading ? __('Checking branch availability...') : __('New branch unavailable'); this.unavailableButtonSpinner.classList.toggle('gl-display-none', !isLoading);
To be clear, this is only a very small verbosity/succinctness/repetition improvement. If you prefer the
if
/else
format, you can safely ignore this and it's totally fine!❔ What is thisType Nitpick Blocker No Tags minor, verbosity, repetition Concern Level 1-10 2
Edited by 🤖 GitLab Bot 🤖