Add basic state management to Jira Connect Vue app
What does this MR do?
Towards #13019 (closed).
We need some kind of "global" state management for the Jira Connect App. The initial use case is to display form error messages in the Vue app.
This MR doesn't display any error message yet - this will come in the final MR (!48651 (merged))
Iteration | MR |
---|---|
Move jira_connect JS to Vue App | !48744 (merged) |
Add basic shared state to Jira Connect Vue app |
|
Render gitlab-ui alert on error |
!48651 (merged) |
Why do we need global state management?
The Jira Connect App is not entirely (or, at all) Vue, but we intend to iterate towards Vue over time.
The form submission code is currently handled by jQuery event listeners.
In the spirit of MVC and to avoid having to refactoring the entire project, this approach allows us to retain the current jQuery code, while progressively iterate towards Vue. We're manipulating the store in response to jQuery-handled events, and (eventually) reading from the store in our Vue app to display an error message.
Why not Vuex?
We may eventually need Vuex, but for now, this ultra-light, ultra-simple approach feels more appropriate. This approach is recommended in the Vue docs
Jira Connect App smoke test
-
Sign in to GitLab button
redirects to GitLab signing page -
After signing in, redirects to You are signed in as @ handle
page -
Add a namespace -
Remove a namespace
Screenshots (strongly suggested)
No visual changes in this MR!
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