Expanding on and inspired by gitlab-ce#13784, improve the user interface for creating and editing variables in CI settings by displaying the variables in a read-only table and moving editing actions into a modal.
Design solution
Restructure UI section with a dedicated table (similar to new approvals UI)
Adding variables will be done through a dedicated modal exposing the configurable options that way
Validation can be done on submit (doesn't require to be done in real time, though nice if possible)
Masked variables are not accepted unless they fulfill regexp requirements
I believe we missed the opportunity to sync and discuss an unified solution for the interface. Please keep in mind the requirements of the issues above for the UI you are proposing :)
Good point @rverissimo. Seems like we should hold off on these UI improvements during %11.11. If we work on them simultaneously, we would need to keep the gitlab-ce~3412464 efforts closely in sync.
@rverissimo this seems to be the case indeed! Though this issue is something that was scoped off from a previous issue https://gitlab.com/gitlab-org/gitlab-ce/issues/13784 and tries to improve the IA in such a way that it becomes more flexible and extendible.
Imo it makes sense to delay this issue by one release in that case, as we'll be adding new functionality for 11.11 with gitlab-ce#46806. The IA problem becomes a little more obvious with each added thing though.
@brendan @jlenny can we agree to move this issue to 12.0 to fix the IA, but refrain from scheduling another issue that touches the same UI in that release?
Thanks for catching this all. This may be something that we hit more often if we're not careful - maybe being clear about the "screens" where we overlap ~Verify and ~Release would be helpful (though the answer may be it always could be a problem if we're not careful).
Hi Team. I'm here as I've ran into confusion with the current "Masked" functionality, as there is no error message provided to the User letting them know why the variables can't be masked. I see from the above it needs to be RegExp compatible. This feature shouldn't have been published without proper UI/UX.
Now that %12.0 has shipped, this issue appears to have been missed. Since it is in progress I'm moving it to the %12.1 release. cc @erushton@mfluharty@jhampton
@jlenny @dimitrieh we are having difficulty prioritizing this enhancement in %12.5. Tentatively moving this into %12.6 for consideration from Product. Please adjust the milestone if needed.
This issue fixes important usability problems for the variables project settings section, therefore it is important to prioritize. Additionally due to this not getting into 12.4 #24172 (closed) will ship with inconsistent UI until this gets implemented.
@jlenny @thaoyeager will this be reconsidered for %12.7. This fixes important usability problems to a UI area where we have invested a lot of new feature changes/additions over the last half-year.
@jlenny I thought this was not a real deliverable for 12.6 as it misses the Deliverable label. However, I do see the workflowready for development label, which does indicate engineering commitment, correct? If so, this is fine
Per discussion with @dcipoletti, this issue has not been committed to by CI Frontend team (hence no Deliverable label) and will need to wait until some other frontend work on a related issue is completed.
1. I suggest moving the action buttons to the top of the list. Currently, they are positioned on the bottom of the list, and will be pushed once more variables are added, making it difficult for users to manipulate the list. See image below:
2. can you include a responsive view to this list? We currently have a problem with the UI that does not behave so nicely on a small viewport. It would be nice to include here some of the UI polish work as well.
3. The dropdown needs to be improved to display a list of existing environments to the user. This bug was reported in an issue for ~"devops::release" and I suggest making the following addition to the UI/UX: #26463 (comment 268217004). We can work on it separately but it would be nice to know that this change will be included in your acceptance criteria.
@dimitrieh @rverissimo Agreed that it would be great to see a UX spec for a responsive view!
A few other thoughts/questions:
It would be great to include some large variable keys/values in the UX specs, since this is a pain point with the current design. We should make sure to define how the fields should expand/rearrange/truncate in response to large values.
What's the advantage of moving the input into a modal dialog? I feel like this might make entering lots of variables more tedious than it is today.
If we do move forward with a modal dialog, we should give special care to the keyboard focus to allow multiple variables to be added and saved entirely from the keyboard.
What's the advantage of moving the input into a modal dialog? I feel like this might make entering lots of variables more tedious than it is today.
We didn't validate this proposal with users yet so I'd say the trade-off is really around decluttering the UI and moving the managing of the variables to a different view. But I'd love to test this proposal out and see how people actually want to interact with it. @jmeshell we spoke about it this week, perhaps something we can take over to ~"devops::release" ?
@jmeshell Yup, I'd say confirming the ownership here would be a great first step. Perhaps we can partner up and do the validation together. I'd love to experiment with some cross-functional ux collab @dimitrieh
@pburdette from a UX point of view, yes. We can partner up and do the workflowdesign together with devopsverify. Not sure how the development phase/ownership would look like, though. But I don't see this as a blocker for the design phase.
I went ahead and brought in the environments api endpoint and the environment scope dropdown is populated in a list format. We can follow up on an iteration to improve UX on that such as listing alphabetically etc. But the bulk of that work is already in place now.
@jmeshell Thanks for the update. Just curious, what is the related bug? Might be good for me and @pburdette to be aware of it to avoid change collisions.
@rayana based on #26463 (closed) it seems your team will be picking the issue with the environment_scope dropdown. So should I leave this dropdown as a static dropdown with one option of All environments ?
FYI, I'm looking into pre-filling the dropdown with the correct environment data right now.
@rayana@dimitrieh I tracked down the endpoint to get predefined environments for the environment_scope dropdown. It's being pre-filled with that data now.
FYI, I'm rebuilding this feature in Vue. And I'm using the gl-table component.
When a user clicks the edit icon for a variable, is it okay if the edit ability opens up in a dropdown with the data pre-filled in the modal?
Why do we want to have masked enabled by default? Since it's based on the variables value, if we tracked it real time they would immediately see error messages since the value doesn't meet our criteria for masked since there will be no value present.
For question 2, I disable the masked checkbox until the regex requirements are met for the value field. After the requirements are met, it enables real time.
When a user clicks the edit icon for a variable, is it okay if the edit ability opens up in a dropdown with the data pre-filled in the modal?
I am not exactly sure I get what you are saying .
"User clicks Edit icon" => "Opens a dropdown" => "also gets a modal"?
Data prefilled sounds right!
Why do we want to have masked enabled by default? Since it's based on the variables value, if we tracked it real time they would immediately see error messages since the value doesn't meet our criteria for masked since there will be no value present.
For question 2, I disable the masked checkbox until the regex requirements are met for the value field. After the requirements are met, it enables real time.
Your solution sounds good! Basically, when the user has not yet started editing the error box will not show up yet, correct?
Sorry I meant to say that when the edit icon is clicked on a variable it will open up a modal with the data to be edited. I was just making sure we didn't want to have the edit icon change the static table of information into an editable list of DOM nodes. This would complicate things a good bit.
I'll provide you a screen recording to visually explain what I'm talking about for the masked feature.
Given current progress in %12.8 and that this is still in planning breakdown I don't expect this to be completed for this milestone. For now I am moving to %12.9 where it will need to be evaluated again amongst the other priorities there (and progress on %12.8) as we get closer to commitment for that release.
@jyavorska apologies, the workflow label should have been in development. I hope to have this MR wrapped up by end of week and in review. !24088 (closed)
Update: This should be all in by end of week, as long as maintainers can review in a timely manner. Had to break up my larger WIP MR into four smaller MRs to keep reviews light.
All code is in master now! So any fresh branch or review app will have these changes enabled by default. Old code is still present at the moment until we confirm this feature is 100% working the way we want it too. That way we can easily roll back to the Haml version (old UI) at any point right now.
Thanks for the update here @pburdette Very convenient in the video format!
In terms of functionality, this seems great! I do have a concern for the masking regex requirement implementation as shown in the video. It is very subtle and doesn't communicate to the user what is needed apart from the checkbox description.
Perhaps we can add make that part of the description bold when disabled. Wdyt?
Also, what happens if you enable masking, but then alter the variable value to not be inline with the regex requirements? (I would expect an error message as described in the description of this issue)
I think the wording for the Protect variable option is wrong or misleading. It's not "allowing" it to run on protected branches and tags. It's restricting it to only be available to pipelines that are running on protected branches or tags.
Showing strange for me too. All variables are listed as type File when in
fact they are not. It's still working.
[image: Screen Shot 2020-02-26 at 11.29.34 AM.png]
I think the problem may be a long variable name. The longest we seem to have is OMNIBUS_SINGLE_BRANCH_VERSION (29 characters)
The problem is exacerbated when 'Reveal values' is clicked, as then I pretty much only see the key and the value before having to scroll, since almost all of these values are long strings without spaces.
Also, for some reason in the modal we're defining select fields with a fixed height: 34px rule, which causes a cutoff if the browser is using anything other than the default Medium font size (I use Large on a 4K display):
Thanks a ton @rspeicher! I'll look over these edge cases and apply some fixes.
@bdowney I'm not seeing any problems on my end when fetching variables on load. If they are sent up as env_var or file they should come down properly. Are you positive when these variables were created they were the env_var type? Thanks
We could make the table a fixed width and the columns overflow: hidden with text-overflow: ellipsis
So a really long key would be REALLY_LONG_KEY...
@dimitrieh WDYT? But the only way to see what the key is right now would be to edit the variable, which isn't the best. Or we possibly could do a tooltip to show the full key/value when hovering a value that is hidden due to its width.
@pburdette the design intended for the columns for some to be a fixed width and other to fill up the remaining space in certain percentages. This way horizontal scrolling of the entire table does not happen.
On mobile, the table converts a mobile table.
For long values, if it exceeds the space overflow: hidden with text-overflow: ellipsis is the solution I had in mind. If possible, can we make the complete value show up in a pop-over together with a copy to clipboard button like so (This popover will show regardless of the value being ellipsed):
So they were all showing "File" because that's default if nothing is returned from the endpoint. And it looks like the controller for groups isn't sending back the variable type in the response.
Amount of used space for the table is quite small, it seems to be less wide than before
It's actually the same width, both tables are in a col-lg-12. But I thought it was quite small to, I like the width on the groups settings better But that would require an entire refactor of the entire project settings layout.
Variable values seem to be leveled with less important data such as var type etc
Do you propose we leave out the variable type from the display table? This will help a lot with space. I know it wasn't in the mockup for the table or modal, but as we discussed this was a mistake as it's needed for adding a variable but maybe not needed for users to view in a table.
Ordering of variables (on what is this currently based?)
My new MR opened !26098 (merged) orders these now by key in ascending order
true/false is harder to read on a glance (might need to swap for colored icons)
Let's do this, I had this in mind as well. What icons?
Environment scope value takes to much space with default value all environments
Agreed, not sure if we can explain the scope with an icon for All environments ?
I have an MR to fix / discuss all of this opened here !26098 (merged)
While it's good it's behind a feature flag, it's defaulted to enabled so if we can't address everything before we're close to a 12.9 release, it will need to be reverted or change the default feature flag value.
I removed the variable type. And set the columns protected & masked to a set width of 100px and the remaining columns to a equal width of 180px. This helps spacing a good bit. WDYT? Variables are ordered by key in ascending order.
@dimitrieh Thanks for your guidance thus far on this. It looks like until we have the above questions answered that frontend is blocked. Looking forward to your expertise!
@pburdette I've again disabled the feature flag on production due to a major bug:
charlie ablett:charlieshat: Today at 3:37 PMRuby colleague of mine found this bug, introduced in the last 12h: “If you open a CI variable to edit it, if you x out of the popup, it removes the variable completely”. Is this known?4 repliesRobert Speicher 5 minutes agocc @pburdetteRobert Speicher 3 minutes agoWow, it deletes the variable even on the backend. The hell?Robert Speicher 2 minutes agohttps://gitlab.slack.com/archives/C101F3796/p1584391225445100GitLab ChatopsThe feature flag value has been updated!Posted in #production | Today at 3:40 PM | View messageRobert Speicher 1 minute ago@charlie I've disabled the flag globally on production, please thank them for finding that.
Testing myself, when you close the modal it sends this PATCH request: