Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rendering multiple routes to an Outlet #716

Merged
merged 10 commits into from
Apr 7, 2020

Conversation

agubler
Copy link
Member

@agubler agubler commented Apr 2, 2020

Type: feature

The following has been addressed in the PR:

Description:

Changes the concept of an Outlet to support rendering multiple matching "routes" to a single outlet. Now using an outlet gives flexibility to render views for an application's routes in a more natural layout, reduces repetitive uses of an Outlet that duplicate layout and logic.

The existing Outlet behaviour has been moved to Route that more accurately describes its behaviour.

Resolves #715

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 2, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 683bff0:

Sandbox Source
bold-sutherland-pzpn5 Configuration

@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #716 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #716      +/-   ##
==========================================
+ Coverage   97.75%   97.77%   +0.01%     
==========================================
  Files         120      121       +1     
  Lines        6949     7010      +61     
  Branches     1577     1592      +15     
==========================================
+ Hits         6793     6854      +61     
  Misses        156      156              
Impacted Files Coverage Δ
src/routing/ActiveLink.ts 100.00% <100.00%> (ø)
src/routing/Outlet.tsx 100.00% <100.00%> (ø)
src/routing/Route.ts 71.42% <100.00%> (ø)
src/routing/Router.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32bab69...683bff0. Read the comment docs.

Copy link
Contributor

@maier49 maier49 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some grammar/typo fixes. Looks good to me otherwise

docs/en/routing/introduction.md Outdated Show resolved Hide resolved
docs/en/routing/introduction.md Outdated Show resolved Hide resolved
docs/en/routing/introduction.md Outdated Show resolved Hide resolved

To take advantage of the code splitting there are 4 rules:

1. The routing configuration needs to be the default export in the `src/routes.ts` module.
2. The widgets must be the default export of their module.
3. The `renderer` property must be defined inline.
4. The outlet `id` must be static and defined inline.
4. The `id` and `outlet` in the routing config and must be static and defined inline.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if "routing config and" is missing the and's "what" or just an extra "and"

docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
docs/en/routing/supplemental.md Outdated Show resolved Hide resolved
Co-Authored-By: Bradley Maier <brdlmaier49@gmail.com>
dylans
dylans previously requested changes Apr 5, 2020
});
```

or using outlets and the `Outlet` widget, check out the [`Outlet` documentation](/learn/routing/outlets) for more information;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incomplete thought / start of sentence?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dylans I think this is supposed to be a colon for the example below

docs/en/routing/introduction.md Outdated Show resolved Hide resolved
agubler and others added 2 commits April 6, 2020 11:53
@agubler
Copy link
Member Author

agubler commented Apr 6, 2020

@dylans I've updated based on your review.

@agubler agubler dismissed dylans’s stale review April 7, 2020 14:17

addressed comments

@agubler agubler merged commit c835aeb into dojo:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support rendering multiple routes into a single target outlet
3 participants