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

updated active-class-name example to also demo a [slug] path #15924

Merged
merged 4 commits into from Aug 6, 2020

Conversation

AubreyHewes
Copy link
Contributor

@AubreyHewes AubreyHewes commented Aug 5, 2020

updated example for active-class-name to also support a [slug].js page that matches on as instead of href (as href would be /[slug])

This does not demo [..slug].js as this requires possible custom code for determining the slug path part for the active classname. i.e. page tree active nodes. A possible other example or another PR on this example.

Has possible information for:

@ijjk ijjk added the examples Issue/PR related to examples label Aug 5, 2020
@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 12.3s 12.2s -88ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 2.315 2.289 -0.03
/ avg req/sec 1080.09 1092.41 +12.32
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.505 1.606 ⚠️ +0.1
/error-in-render avg req/sec 1661.37 1556.7 ⚠️ -104.67
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 16s 13.5s -2.5s
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: 55aac17

@AubreyHewes AubreyHewes force-pushed the pr/examples/active-class-name branch from 55aac17 to 73c9124 Compare August 5, 2020 23:10
@AubreyHewes AubreyHewes force-pushed the pr/examples/active-class-name branch from 73c9124 to b4c0cb9 Compare August 5, 2020 23:15
@AubreyHewes
Copy link
Contributor Author

Sorry was bumming around on the linting.. had the example opened in a separate project so the base linting rules were not applied.. 🐑

@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 14s 14s -34ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall increase ✓
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 2.585 2.579 -0.01
/ avg req/sec 967.15 969.38 +2.23
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.587 1.516 -0.07
/error-in-render avg req/sec 1575.46 1649.17 +73.71
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 15.1s 15.7s ⚠️ +540ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: 73c9124

@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 11.4s 12.1s ⚠️ +675ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 2.16 2.18 ⚠️ +0.02
/ avg req/sec 1157.57 1146.65 ⚠️ -10.92
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.322 1.331 ⚠️ +0.01
/error-in-render avg req/sec 1891.03 1878.37 ⚠️ -12.66
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 12.4s 13.4s ⚠️ +1s
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: b4c0cb9

@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 12.8s 12.9s ⚠️ +157ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall increase ✓
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 2.353 2.253 -0.1
/ avg req/sec 1062.41 1109.79 +47.38
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.277 1.229 -0.05
/error-in-render avg req/sec 1958.23 2034.26 +76.03
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 14.4s 14.2s -201ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: 4a136ef

Comment on lines 26 to 27
<ActiveLink activeClassName="active" href="/[slug]" as="/slug">
<a className="nav-link">Slug</a>
Copy link
Member

Choose a reason for hiding this comment

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

This feels less confusing, as /slug is very similar to /[slug], and Dynamic Route gives you a better idea of what the link means.

Suggested change
<ActiveLink activeClassName="active" href="/[slug]" as="/slug">
<a className="nav-link">Slug</a>
<ActiveLink activeClassName="active" href="/[slug]" as="/dynamic-route">
<a className="nav-link">Dynamic Route</a>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is the example... it is not dynamic.. may be static

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe better would be /some-slug ?

Copy link
Member

Choose a reason for hiding this comment

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

@AubreyHewes It's static but also dynamic, with Next.js you can have both!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

users who use a [slug].ts or [...slug].ts possibility will understand the example... i.e. that you can do a NavLink on the as as well as the proposed href match.. cms pages (getStaticPaths) vs hardcoded pages. Anyway If you think that it is required to rename the path as Dynamic Route that is fine, I just do not agree.

@vercel vercel deleted a comment from AubreyHewes Aug 6, 2020
@AubreyHewes AubreyHewes closed this Aug 6, 2020
@lfades
Copy link
Member

lfades commented Aug 6, 2020

@AubreyHewes Why did you close the PR? I was about to approve it 😢

@AubreyHewes AubreyHewes reopened this Aug 6, 2020
@AubreyHewes
Copy link
Contributor Author

OMG soz mate!.. wrong button, wrong button!

Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

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

@AubreyHewes Thank you, good work!

@AubreyHewes
Copy link
Contributor Author

@lfades omg soz.. wanted to close the comment I was making... but went too far, just clicking accepting everything "I agree" :-D... what a world! what a world! what a world!

@AubreyHewes AubreyHewes closed this Aug 6, 2020
@AubreyHewes AubreyHewes reopened this Aug 6, 2020
@AubreyHewes
Copy link
Contributor Author

I did it again 🐑 (wrong tab... this time)

@ijjk
Copy link
Member

ijjk commented Aug 6, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 12.9s 12.5s -412ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 2.297 2.223 -0.07
/ avg req/sec 1088.32 1124.82 +36.5
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.2 1.268 ⚠️ +0.07
/error-in-render avg req/sec 2084.01 1971.92 ⚠️ -112.09
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 13.7s 13.7s -5ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: 9b458ab

@ijjk
Copy link
Member

ijjk commented Aug 6, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 10.4s 10.2s -159ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
/ failed reqs 0 0
/ total time (seconds) 1.865 1.85 -0.01
/ avg req/sec 1340.34 1351.27 +10.93
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.021 1.048 ⚠️ +0.03
/error-in-render avg req/sec 2448.95 2385.81 ⚠️ -63.14
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Rendered Page Sizes
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
index.html gzip 947 B 947 B
link.html gzip 953 B 953 B
withRouter.html gzip 942 B 942 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
buildDuration 11.3s 11.4s ⚠️ +137ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..8895.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-da9f477..d581.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.9 kB 56.9 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
677f882d2ed8..dule.js gzip 6.21 kB 6.21 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-ccc9938..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-f4d2979..e57b.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-653c74f..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 553 B 553 B
Serverless bundles
vercel/next.js canary AubreyHewes/next.js pr/examples/active-class-name Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.22 MB 5.22 MB
Commit: 87395ea

@kodiakhq kodiakhq bot merged commit 7d8e0c5 into vercel:canary Aug 6, 2020
@AubreyHewes AubreyHewes deleted the pr/examples/active-class-name branch August 6, 2020 01:33
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants