Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
page_title
helper inApplicationHelper
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]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:
NavigationItem#url
method to accept apath_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
)base_path_with_locale
instead ofbase_url_with_locale
, ensuring relative paths are used for navigation within the platform. (app/views/layouts/better_together/_navbar_brand.html.erb
)Documentation:
README.md
)