Add a common thWidthClass table utility function
What does this MR do?
This MR adds a common thWidthClass
utility function in a new file table_utility.js
and replaces the method in several files. Changes made:
- Add thWidthClass table utility function !62100 (0b11f2a4)
- Update use cases of thWidthClass to use utilities !62100 (1f50d1a3)
Validation
grep -Hrn 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!' ./
Before
./app/assets/javascripts/admin/users/components/users_table.vue:12: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!';
./app/assets/javascripts/pipelines/components/pipelines_list/pipelines_table.vue:17: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1! gl-font-sm!';
./app/assets/javascripts/jobs/components/table/jobs_table.vue:12: thClass: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!',
./ee/app/assets/javascripts/billings/seat_usage/constants.js:4: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!';
./ee/app/assets/javascripts/status_checks/components/status_checks.vue:9: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!';
After
./app/assets/javascripts/pipelines/components/pipelines_list/pipelines_table.vue:17: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1! gl-font-sm!';
./app/assets/javascripts/lib/utils/constants.js:21: 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!';
Note that the DEFAULT_TH_CLASSES
value in pipelines_table.vue
includes additional classes.
Testing and setup
Admin/users
- Enable the Vue table feature flag:
echo "Feature.enable(:vue_admin_users)" | rails c
Seat usage
- Enable the
Check feature availability on namespace plan
setting in Admin > General Settings. - Upgrade the group you want to test (
gitlab-org
) to paid plan at[GDK_HOST]/admin/groups/gitlab-org/edit
.
Jobs table
- Enable Vue jobs table feature flag:
echo "Feature.enable(:jobs_table_vue)" | rails c
Status checks
- Enable the external status checks feature flag:
echo "Feature.enable(:ff_compliance_approval_gates) | rails c"
- Add a Status Check under Project > General Settings > Merge request (MR) approvals > Add approval rule.
- Note: This is the only place where you can create a status check - this is temporary untill !61702 (comment 574975925) is merged.
- View the status checks in Project > General Settings > Status checks.
Screenshots (strongly suggested)
Admin/users
[GDK_HOST]/admin/users
Before | After |
---|---|
![]() |
![]() |
Seat usage
[GDK_HOST]/groups/gitlab-org/-/billings
Before | After |
---|---|
![]() |
![]() |
Jobs table
[GDK_HOST]/flightjs/Flight/-/jobs
Before | After |
---|---|
![]() |
![]() |
Status checks
[GDK_HOST]/gitlab-org/gitlab-shell/edit
Before | After |
---|---|
![]() |
![]() |
Does this MR meet the acceptance criteria?
Conformity
- [-] I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) -
No visual change
- [-] I have added/updated documentation, or it's not needed. (Is documentation required?) -
No visual change
-
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) - [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Security
Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #329854 (closed)
Edited by Jiaan Louw