Add mobile support for "Run pipeline" variables form
What does this MR do?
Layout improvements related to #30101 (closed)
Mobile support improvement
before | after |
---|---|
![]() |
![]() |
![]() |
![]() |
setVariable
method
New This method will be useful in the next MR, so that variables values can be loaded asynchronously after the form has been loaded.
No changes are needed in the spec
For example, to simulate loading different variables when changing the selection for branch, we can add this code:
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
index afcce5b4f33..163708c6fe9 100644
--- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
+++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
@@ -121,6 +121,14 @@ export default {
this.setVariableParams(FILE_TYPE, this.fileParams);
}
},
+ watch: {
+ refValue(value) {
+ this.setVariableParams(VARIABLE_TYPE, {
+ value,
+ [`${value}_1`]: 'value_1',
+ });
+ },
+ },
methods: {
setVariable(type, key, value) {
const variable = this.variables.find(v => v.key === key);
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
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
Edited by Miguel Rincon