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

1.1.0 #21

Merged
merged 1 commit into from
Feb 18, 2025
Merged

1.1.0 #21

merged 1 commit into from
Feb 18, 2025

Conversation

kethinov
Copy link
Member

  • Added feature which will allow single-page-express to remember the scroll position of pages that have been visited. It will also remember the scroll position of child containers on each page as well, but only if those containers have assigned id attributes.
    • Added alwaysScrollTop param which will let you disable this behavior app wide and res.resetScroll which will let you disable this behavior on a per-route basis.
  • Added new behaviors to the default render method. It will now:
    • Update the attributes of the <html> and <head> tags.
    • Add new children to the <head> tag if anything new is in the template render.
    • Delay the DOM update until any new <link> or <script> tags load to prevent a FOUC.
    • Set browser focus appropriately after the DOM update. Also added res.focus to let you set it manually.
    • Announce page changes to screen readers.
  • Added res properties which will let you remove elements from the <head> tag on a per route basis: res.removeMetaTags, res.removeStyleTags, res.removeLinkTags, res.removeScriptTags, res.removeBaseTags, res.removeTemplateTags. There is also res.removeHeadTags to remove all children of the <head> tag except the <title> tag.
  • Added topBarRoutes param to allow restricting the top bar to certain routes.
  • Added req.singlePageExpress which you can use to detect if your route is executing in the single-page-express context.
  • Fixed a bug which caused back/forward buttons to not function properly sometimes.
  • Fixed a bug which would cause the top bar not to ever hide if it was enabled but the default render method was replaced.
  • Fixed a bug in the Express sample app that would cause server-rendering to fail on routes with more than one /.
  • Added a new sample app.
  • Added an automated test suite and a few starter tests.
  • Refactored some code to simplify it.
  • Removed some unneeded dependencies.
  • Updated dependencies.

- Added feature which will allow `single-page-express` to remember the scroll position of pages that have been visited. It will also remember the scroll position of child containers on each page as well, but only if those containers have assigned `id` attributes.
  - Added `alwaysScrollTop` param which will let you disable this behavior app wide and `res.resetScroll` which will let you disable this behavior on a per-route basis.
- Added new behaviors to the default render method. It will now:
  - Update the attributes of the `<html>` and `<head>` tags.
  - Add new children to the `<head>` tag if anything new is in the template render.
  - Delay the DOM update until any new `<link>` or `<script>` tags load to prevent a FOUC.
  - Set browser focus appropriately after the DOM update. Also added `res.focus` to let you set it manually.
  - Announce page changes to screen readers.
- Added `res` properties which will let you remove elements from the `<head>` tag on a per route basis: `res.removeMetaTags`, `res.removeStyleTags`, `res.removeLinkTags`, `res.removeScriptTags`, `res.removeBaseTags`, `res.removeTemplateTags`. There is also `res.removeHeadTags` to remove all children of the `<head>` tag except the `<title>` tag.
- Added `topBarRoutes` param to allow restricting the top bar to certain routes.
- Added `req.singlePageExpress` which you can use to detect if your route is executing in the `single-page-express` context.
- Fixed a bug which caused back/forward buttons to not function properly sometimes.
- Fixed a bug which would cause the top bar not to ever hide if it was enabled but the default render method was replaced.
- Fixed a bug in the Express sample app that would cause server-rendering to fail on routes with more than one `/`.
- Added a new sample app.
- Added an automated test suite and a few starter tests.
- Refactored some code to simplify it.
- Removed some unneeded dependencies.
- Updated dependencies.
@kethinov kethinov merged commit a1ee60b into rooseveltframework:main Feb 18, 2025
@kethinov kethinov deleted the 1.1.0 branch February 18, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant