Skip to content

Conversation

rsmithlal
Copy link
Member

This pull request introduces several improvements to the Better Together platform's navigation and page rendering. The main focus is on enhancing how page titles are generated, improving URL handling for navigation items, and refining branding display in the navigation bar. The changes also include a minor documentation cleanup.

Page title and navigation improvements:

  • Added a page_title helper in ApplicationHelper to consistently generate page titles by combining a page-specific title with the platform name, and updated the main layout to use this helper. This ensures better SEO and a more consistent user experience. (app/helpers/better_together/application_helper.rb, app/views/layouts/better_together/application.html.erb) [1] [2]
  • Introduced a turbo_native_app? helper to detect Turbo Native requests, allowing conditional logic in helpers and page titles for native app contexts. (app/helpers/better_together/application_helper.rb)

Navigation and URL handling:

  • Updated the NavigationItem#url method to accept a path_only parameter, allowing the generation of path-based URLs instead of full URLs when needed. This adds flexibility for navigation rendering and routing. (app/models/better_together/navigation_item.rb)
  • Changed the branding link in the navbar to use base_path_with_locale instead of base_url_with_locale, ensuring relative paths are used for navigation within the platform. (app/views/layouts/better_together/_navbar_brand.html.erb)

Documentation:

  • Removed outdated or redundant documentation references to simplify the README. (README.md)

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.

1 participant