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

Improve scroll behavior on route change #264

Closed
zdavis opened this Issue Apr 18, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@zdavis
Member

zdavis commented Apr 18, 2017

Currently this is handled in an ad hoc way. When the Frontend Container receives new props, it checks to see if the location has changed. If it has, the container scrolls the window to the top. This behavior needs to be made more nuanced. For example, if the route stays and params change, we likely do not want to scroll. We may want to delegate the scroll decision to children containers. Furthermore, rather than implementing this in the Frontend Container, it should be implemented in a router decorator.

This is a current problem for resource collection filters, which change param and cause an awkward scroll.

@zdavis zdavis added the bug label Apr 18, 2017

@zdavis zdavis self-assigned this Apr 18, 2017

@zdavis

This comment has been minimized.

Show comment
Hide comment
@zdavis

zdavis Apr 21, 2017

Member

Related to #276

Member

zdavis commented Apr 21, 2017

Related to #276

@zdavis zdavis added this to the v0.2 milestone Apr 21, 2017

@zdavis zdavis added the in progress label May 4, 2017

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application.

Fixes #310: Typekit fonts should load (if configured) when SSR is absent
Fixes #309: Use custom dialog box for confirmation on leaving forms
		   without saving first.
Fixes #304: Component FetchData methods should not be triggered by URL
		   hash changes
Fixes #276: Update react-router from 2.x to 4.x
Fixes #264: Improve scroll behavior on route change

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application.

Fixes #310: Typekit fonts should load (if configured) when SSR is absent
Fixes #309: Use custom dialog box for confirmation on leaving forms
		   without saving first.
Fixes #304: Component FetchData methods should not be triggered by URL
		   hash changes
Fixes #276: Update react-router from 2.x to 4.x
Fixes #264: Improve scroll behavior on route change

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application.

Fixes #310: Typekit fonts should load (if configured) when SSR is absent
Fixes #309: Use custom dialog box for confirmation on leaving forms
		   without saving first.
Fixes #304: Component FetchData methods should not be triggered by URL
		   hash changes
Fixes #276: Update react-router from 2.x to 4.x
Fixes #264: Improve scroll behavior on route change

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application. This commit also begins introducing
human-readable URLs for #275, although there is additional work to be
done on that front.

Fixes #310: 	Typekit fonts should load (if configured) when SSR is
				absent
Fixes #309: 	Use custom dialog box for confirmation on leaving forms
		   		without saving first.
Fixes #304: 	Component FetchData methods should not be triggered by
				URL hash changes
Fixes #276: 	Update react-router from 2.x to 4.x
Fixes #264: 	Improve scroll behavior on route change
Starts #275: 	Implement semantic URLs

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application. This commit also begins introducing
human-readable URLs for #275, although there is additional work to be
done on that front.

Fixes #310: Typekit fonts should load (if configured) when SSR is
absent

Fixes #309: Use custom dialog box for confirmation on leaving forms
without saving first.

Fixes #304: Component FetchData methods should not be triggered by URL
hash changes

Fixes #276: Update react-router from 2.x to 4.x

Fixes #264: Improve scroll behavior on route change

Starts #275: Implement semantic URLs

@zdavis zdavis closed this in #329 May 8, 2017

zdavis added a commit that referenced this issue May 8, 2017

[F] Upgrade react-router to v4; refactor fetchData
This commit upgrades react-router to v4 and fully implements global
link handlers, which are located close to the routes themselves.
Furthermore, it moves container data fetching into a higher order
component, which is easier to understand, and rewrites much of the
server-side-rendering approach. This is an extensive refactoring
of the routing and rendering methods, and as such touches many parts
of the client-side application. This commit also begins introducing
human-readable URLs for #275, although there is additional work to be
done on that front.

Fixes #310: Typekit fonts should load (if configured) when SSR is
absent

Fixes #309: Use custom dialog box for confirmation on leaving forms
without saving first.

Fixes #304: Component FetchData methods should not be triggered by URL
hash changes

Fixes #276: Update react-router from 2.x to 4.x

Fixes #264: Improve scroll behavior on route change

Starts #275: Implement semantic URLs

@zdavis zdavis removed the in progress label May 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment