Skip to content

Adds a url sync component

Sam Beckham requested to merge 10703-url-sync-component into master

What does this MR do?

This adds a <url-sync /> component that behaves in a similar way to the urlsync mixin. It's a bit easier to use and doesn't hide away as much magic as mixins tend to do.

The url component takes a query parameter and watches it. Whenever anything in the query object changes, it parses the object, puts the query in the URL, and pushes a history entry.

One example where this is useful is when filtering results on a page. I've wired up that example and recorded a bit of a walkthrough below.

https://youtu.be/xucDC74Z86o

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

touches #10703 (closed)

Edited by Sam Beckham

Merge request reports

Loading