Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,034
    • Issues 38,034
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,347
    • Merge requests 1,347
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #213282

Closed
Open
Created Apr 02, 2020 by Enrique Alcántara@ealcantaraMaintainer7 of 7 tasks completed7/7 tasks

Adopt Vue Router on Static Site Editor

Summary

Use VueRouter in the Static Site Editor for view transitions and URL routing.

Benefits

  • Less bandwidth usage on view transitions.
  • Out of the box state machine style architecture to handle complex UI workflows
  • Better suited for testing.

Architecture

These models display how routing works from several perspectives: What the actual URLs look like, what components we will implement, and how routes interact with each other. This design is heavily inspired in the design management and Web IDE apps routing designs.

Route pattern

gitlab.com/[namespace]/[project]/-/sse/[editable]/-/(*vueroute)

  • Home: gitlab.com/[namespace]/[project]/-/sse/[editable]/-/
  • Success: gitlab.com/[namespace]/[project]/-/sse/[editable]/-/success

Required backend changes

The way VueRouter + Rails integration works is by using route globbing to delegate part of the URL path processing to the client, for example: The Web IDE and design management app routes. This design decision conflicts with the Static Site Editor route configuration because we can’t put one globbing pattern after the other.

Considering that, we should evaluate moving file validation to a separate endpoint or other actions that can solve this problem.

Components

Highlight: Pages serve as smart components and create a bridge between state management and reusable components.

Static_Site_Editor_Vue_Router_specs_1_

Routes interaction

These are sequence diagrams that demonstrate how the store, pages, and the router interact in two use cases.

Changes were saved successfully

Display the success page when changes are submitted successfully.

sequenceDiagram
  Home->>Store: submit changes
  Store-->>Home: changes saved successfully 🎉
  Home->>Router: push({ name: 'success' })

Tasks

  • Support Vue Router path handling — !30163 (merged) backend
  • Update URL structure in the project template - gitlab-org/project-templates/static-site-editor-middleman!6 (merged) backend
  • Push the new version of the project template — !30642 (merged) backend
  • Set up VueRouter in static site editor app. — !30394 (merged) frontend
  • Move to submit changes success page to a separate route. — !30533 (merged) frontend
  • Handle invalid routes edge case in VueRouter. frontend !31648 (merged)
  • Verify if documentation should be updated after URL changes — documentation !31960 (merged)
Edited May 15, 2020 by Enrique Alcántara
Assignee
Assign to
13.0
Milestone
13.0 (Past due)
Assign milestone
Time tracking