framework7io / framework7io/framework7

Requesting v2 Router documentation about trailing slashes in path

Open
#2,320 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
JavaScript
Stars
18.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Framework7 Version: 2.1.3

  • Platform and Target: generic

What you did

All of the Framework7 router documentation uses trailing slashes in the example routes. It's good that it is consistent. For example, it says:

var view1 = app.views.create('.view-1', {
  routes: [
    {
      path: '/users/',
      url: './pages/users.html',
    },
    {
      path: '/user/',
      url: './pages/user.html',
    },
  ],
});

However, the role of those trailing slashes is never really explained. I tried removing them in my F7-Vue application, and it worked perfectly in most but not all cases-- it took me quite a while to realize that not having the trailing slashes seemed to be the issue. If it's a misconfiguration, it would be nice if the framework could just emit a warning. If it's a feature, maybe an explanation would help others.

Expected Behavior

Documentation improvement to explain the semantics of the trailing slashes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Framework7 v2 Router documentation and the example routes using trailing slashes. Clarify whether trailing slashes affect route matching, explain the behavior and any configuration requirements, and update the documentation so the semantics are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.