这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@labmecanicatec
Copy link
Contributor

New settings:

  • load.mobile.views: Enables mobile views (default: true).
  • auto.scroll.today: Auto-scroll to the current day (default: true).

Allows admins to enable mobile views and auto-scroll to today in the schedule.

@JohnVillalovos
Copy link
Contributor

@labmecanicatec On the 2nd commit, can you split the commit message so that there is a subject line and then the body below that?

Something like:

<SUBJECT/HEADER>

<DESCRIPTION/BODY>

Like this:

feat: Runs device detection if the load.mobile.views setting is true

The AutoScrollToday variable is created from auto.scroll.today

Try to keep the subject line to no more than 70-75 characters if possible. Then put the additional detail of what and why in the body of the commit message.

Thanks!

This commit enables device detection (mobile/tablet/desktop) only when
the load.mobile.views configuration is set to true.

Additionally, the AutoScrollToday variable is created from the
auto.scroll.today config value. This allows the frontend to scroll
to the current day dynamically based on this setting.
@JohnVillalovos JohnVillalovos requested a review from Copilot June 8, 2025 14:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables configurable mobile views and auto-scroll functionality in the schedule feature, allowing admins to toggle these behaviors via new configuration options.

  • Introduces new config keys for mobile views and auto-scroll to today.
  • Implements auto-scroll functionality in the schedule template and associated JavaScript.
  • Updates the page initialization to trigger mobile device detection only when enabled and to pass the auto-scroll setting to the frontend.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tpl/Schedule/schedule.tpl Adds a new auto-scrollToday property to the template settings.
lib/Config/ConfigKeys.php Introduces new configuration keys for mobile views and auto-scroll.
config/config.dist.php Provides default configuration values for mobile views and auto-scroll.
config/config.devel.php Mirrors the production config with new settings for mobile views and auto-scroll.
Web/scripts/schedule.js Implements auto-scroll logic to scroll to today if enabled.
Pages/Page.php Adds condition-based mobile detection and passes auto-scroll configuration to the frontend.

@labmecanicatec
Copy link
Contributor Author

@labmecanicatec On the 2nd commit, can you split the commit message so that there is a subject line and then the body below that?

Something like:

<SUBJECT/HEADER>

<DESCRIPTION/BODY>

Like this:

feat: Runs device detection if the load.mobile.views setting is true

The AutoScrollToday variable is created from auto.scroll.today

Try to keep the subject line to no more than 70-75 characters if possible. Then put the additional detail of what and why in the body of the commit message.

Thanks!

Done!

Copy link
Contributor

@JohnVillalovos JohnVillalovos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks @labmecanicatec

@JohnVillalovos JohnVillalovos merged commit fc9cccc into LibreBooking:develop Jun 8, 2025
7 checks passed
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.

2 participants