You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(cut/pasted from #3319 to avoid sidetracking that issue)
Is there a good story around iterating on a layout without needing to change URLs excessively, when the router is configured with relative paths?
If configured exclusively with absolute paths, you can move components around, change nesting, etc without changing any URLs. That's not the case when the URL is derived from the way components are nested (which will happen in #3319):
// Designer: I want the sidebar visible on the change password screen// URL: /inbox/change-password<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="change-password"component={ChangePassword}/><Routepath="message/:id"component={Message}/></Route></Route>// Designer: No wait, it should appear without the sidebar// URL: /change-password<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="message/:id"component={Message}/></Route><Routepath="change-password"component={ChangePassword}/></Route>// Designer: No wait, bring the sidebar back, but our product is growing// so we need new additional settings screens & let's split them over tabs// URL: /inbox/settings/change-password<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="settings"component={SettingsTabLayout}><Routepath="change-password"component={ChangePassword}/><Routepath="avatar"component={Avatar}/><Routepath="billing"component={Billing}/></Route><Routepath="message/:id"component={Message}/></Route></Route>
Maybe <Redirect> could handle this, but could get a bit gnarly on a larger app with a year's worth of design iterations.
The text was updated successfully, but these errors were encountered:
<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="change-password"component={ChangePassword}/><Routepath="message/:id"component={Message}/></Route></Route>// designer changes mind<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="message/:id"component={Message}/></Route>{/* keep the `inbox` part of the url so it doesn't change. */}<Routepath="inbox/change-password"component={ChangePassword}/></Route>//<Routepath="/"component={App}><Routepath="inbox"component={Inbox}><Routepath="settings"component={SettingsTabLayout}>{/* this is what we were talking about in the other issue, you can do this today to keep it the same */}<Routepath="/inbox/change-password"component={ChangePassword}/><Routepath="avatar"component={Avatar}/><Routepath="billing"component={Billing}/></Route><Routepath="message/:id"component={Message}/></Route></Route>
(cut/pasted from #3319 to avoid sidetracking that issue)
Is there a good story around iterating on a layout without needing to change URLs excessively, when the router is configured with relative paths?
If configured exclusively with absolute paths, you can move components around, change nesting, etc without changing any URLs. That's not the case when the URL is derived from the way components are nested (which will happen in #3319):
Maybe
<Redirect>
could handle this, but could get a bit gnarly on a larger app with a year's worth of design iterations.The text was updated successfully, but these errors were encountered: