Skip to content

feat(utils): Add isDesktop to breakpoint utils

In !938 (merged) we exported breakpoints.js from our utils so we can import it in gitlab and can remove duplicated code there.

This MR adds the isDesktop method which is currently implemented in the breakpoint utils in gitlab (see https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/breakpoints.js#L17) but missing from the gitlab-ui version.

With this change, we should be able to replace the gitlab version of the breakpoints.js later and import our gitlab-ui version. I've created an issue in gitlab to keep track of this, see gitlab#38327 (closed)

In addition, it adds specs for our breakpoints.

Edited by Martin Wortschack

Merge request reports

Loading