Skip to content

Refactor(html5, akka): Make fit to width be persisted between presenters changes - #22644

Merged
antobinary merged 8 commits into
bigbluebutton:v3.0.x-releasefrom
Tainan404:fix-fit-width
Mar 13, 2025
Merged

antobinary merged 8 commits into
bigbluebutton:v3.0.x-releasefrom
Tainan404:fix-fit-width

Conversation

@Tainan404

Copy link
Copy Markdown
Member

What does this PR do?

This PR is a follow-up to #22490, addressing the issue with the 'Fit to Width' functionality. The bug causing 'Fit to Width' to reset occurred because the server did not store this state—it was a client-side only setting. When the client applied zoom with 'Fit to Width' enabled, switching the presenter caused the new presenter's client to be unaware of this setting, resulting in the values being reset to zero.

Closes Issue(s)

Closes #21873

How to test

  • Join with to users (I'll name them one and two).
  • Get user One and put to fill half of the screen.
  • Get User Two and maximize the window.
  • Upload a vertical Presentation.
  • In the one that is presenter apply fit to width.
  • Change the Presenter.
  • See results.

More

Screencast.from.10-03-2025.13.47.45.webm

@coderabbitai

coderabbitai Bot commented Mar 10, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This change set introduces a new command message and its corresponding handler functionality to enable setting a presentation’s "fit-to-width" property. A new trait, SetPresentationFitToWidthCmdMsgHdlr, is implemented in the presentation pod handlers to process the SetPresentationFitToWidthCmdMsg. The handler validates that the user has presenter permissions and, if authorized, updates the presentation page’s fit-to-width setting via the PresPageDAO.updateFitToWidth method. In parallel, the database layer is enhanced by adding a new Boolean field fitToWidth to the presentation page models and updating the SQL schema to include this column. Client-side changes include a new GraphQL mutation and updated subscriptions/queries to handle the property, as well as modifications within UI components to reflect the new state. Existing functionalities remain unchanged while the new feature extends presentation configuration capabilities.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant GraphQLServer
    participant MeetingActor
    participant PresPodHdlr as PresentationPodHandler
    participant DB

    Client->>GraphQLServer: Invoke presentationSetFitToWidth mutation
    GraphQLServer->>MeetingActor: Publish SetPresentationFitToWidthCmdMsg
    MeetingActor->>PresPodHdlr: Route SetPresentationFitToWidthCmdMsg
    PresPodHdlr->>PresPodHdlr: Validate user permissions
    alt Permission granted
        PresPodHdlr->>DB: Call updateFitToWidth(pageId, fitToWidth)
        DB-->>PresPodHdlr: Confirm update
        PresPodHdlr-->>MeetingActor: Return updated state
    else Permission denied
        PresPodHdlr->>MeetingActor: Eject user from meeting
    end
    MeetingActor-->>GraphQLServer: Updated meeting state
    GraphQLServer-->>Client: Send updated presentation page data
Loading

Suggested labels

status: conflict

Suggested reviewers

  • gustavotrott
  • ramonlsouza

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4105778 and feafbe8.

📒 Files selected for processing (1)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx (0 hunks)
💤 Files with no reviewable changes (1)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-webrtc)
  • GitHub Check: build-package (bbb-freeswitch)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-fsesl-akka)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-etherpad)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-learning-dashboard)
  • GitHub Check: build-package (bbb-export-annotations)
  • GitHub Check: build-package (bbb-config)
  • GitHub Check: build-package (bbb-apps-akka)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
bigbluebutton-html5/imports/ui/components/app/container.jsx (2)

82-82: Add optional error handling for mutation.
Using useMutation is straightforward, but consider catching errors (e.g., in an onError callback) to provide user feedback on failure.


105-112: Refine mutation callback to handle response and errors.
Currently, the mutation doesn't track success or error states. Adding a .then/.catch or onCompleted/onError handler can improve user feedback if the update fails.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1)

9-31: Revisit references to “infinite whiteboard” for clarity.
The permission-checking logic reuses “infiniteWhiteboard” reasons for a “fit to width” feature, which can be confusing. Consider renaming and clarifying these messages to match the new functionality. Also, consider removing the semicolon at line 25 for idiomatic Scala style.

- val reason = "No permission to set infinite whiteboard."
+ val reason = "No permission to set fit-to-width."
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala (1)

139-149: Handle errors robustly in updateFitToWidth.
While logging is helpful, consider surfacing failures to the caller or capturing them for retry logic.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7ba1d1 and 411cd43.

📒 Files selected for processing (15)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodHdlrs.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala (4 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPresentationDAO.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (1 hunks)
  • bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala (1 hunks)
  • bbb-graphql-actions/src/actions/presentationSetFitToWidth.ts (1 hunks)
  • bbb-graphql-server/bbb_schema.sql (3 hunks)
  • bigbluebutton-html5/imports/ui/components/app/app-graphql/mutations.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/app/app-graphql/queries.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/app/component.jsx (3 hunks)
  • bigbluebutton-html5/imports/ui/components/app/container.jsx (5 hunks)
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-fsesl-akka)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (26)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodHdlrs.scala (1)

35-35: Well-structured trait addition for the fit-to-width functionality.

The addition of SetPresentationFitToWidthCmdMsgHdlr to the existing trait chain follows the established pattern in this class. This trait will handle the newly introduced command to persist presentation fit-to-width settings.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPresentationDAO.scala (1)

183-183: Database model correctly updated to store fitToWidth property.

The fitToWidth field has been appropriately added to the PresPageDbModel instantiation, ensuring that the presentation fit-to-width property is persisted in the database when updating presentation pages.

bigbluebutton-html5/imports/ui/components/app/app-graphql/queries.ts (1)

1-15: Well-designed GraphQL subscription for fit-to-width updates.

This new GraphQL subscription query is appropriately structured to fetch the fitToWidth and pageId fields from the current press page, which aligns with the PR objective of making fit-to-width persistent between presenter changes. The subscription pattern allows real-time updates when the values change.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (1)

635-635: Message handler correctly integrated in the appropriate location.

The new case for SetPresentationFitToWidthCmdMsg is correctly placed among other presentation-related message handlers and passes the message to the presentationPodsApp.handle method, maintaining consistency with the existing pattern for handling presentation commands.

bigbluebutton-html5/imports/ui/components/app/app-graphql/mutations.ts (1)

1-17: Clean and focused GraphQL mutation for 'fit to width' functionality.

The implementation defines a GraphQL mutation that allows setting the "fit to width" property for a presentation page. The mutation takes two required parameters: a boolean fitToWidth value and the pageId string to identify which page to update. This forms the foundation for persisting the "fit to width" setting when changing presenters.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scala (1)

22-36: Good addition of the fitToWidth property to the PresentationPage case class.

The addition of the fitToWidth Boolean parameter with a default value of false integrates well with the existing parameters. The consistent formatting alignment of parameters improves readability.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1)

295-296: Appropriate message handler for SetPresentationFitToWidthCmdMsg.

The routing of the new SetPresentationFitToWidthCmdMsg message type is correctly implemented using the routeGenericMsg method, consistent with the pattern used for other presentation-related messages. This ensures that fit-to-width commands are properly processed in the message handling architecture.

bbb-graphql-server/bbb_schema.sql (3)

1365-1366: Schema properly extended with fitToWidth column.

The pres_page table definition has been correctly modified to include the fitToWidth Boolean column, enabling persistence of this setting.


1426-1427: View definitions properly updated to include fitToWidth.

The view v_pres_page includes the new fitToWidth field, ensuring it can be queried through the view.


1460-1461: Current page view updated to expose fitToWidth property.

The v_pres_page_curr view includes the fitToWidth field, making it accessible for the current presentation page, which is critical for preserving this setting when switching presenters.

bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (2)

1404-1409: Improve dependency handling for fitToWidth effect.

This change removes isPresenter from the dependency array, making the effect only run when fitToWidth changes. This is essential for persisting the fit-to-width setting when switching presenters, but it could lead to unexpected behavior if the implementation changes in the future.

Consider adding a comment explaining why isPresenter is intentionally omitted from the dependency array to help future developers understand this design decision.


1447-1482: Correctly updated dependency array to handle presenter changes.

Adding isPresenter to this dependency array ensures the camera synchronization logic reruns when the presenter changes, which is necessary for the fit-to-width persistence feature to work correctly.

This change correctly implements the synchronization of the presentation view when the presenter changes, ensuring the fit-to-width setting is properly maintained.

bigbluebutton-html5/imports/ui/components/app/component.jsx (3)

157-157: Added fitToWidth prop to component props.

This change extends the component's interface to include the fitToWidth property, allowing the component to respond to changes in this setting from parent components.


178-180: State update for fitToWidth changes.

The implementation correctly updates the component's state when the fitToWidth prop changes, enabling persistence of this setting between presenter changes.


192-194: Enhanced setPresentationFitToWidth to propagate changes upwards.

Added a call to handlePresentationFitToWidth to ensure changes to the fitToWidth setting are communicated to parent components, which is essential for persisting this setting.

bbb-graphql-actions/src/actions/presentationSetFitToWidth.ts (1)

1-31: Well-implemented message builder for the new fitToWidth feature.

This new file provides a clean implementation of the Redis message builder for setting the fitToWidth property. It correctly:

  1. Validates that the user is a presenter (line 5)
  2. Validates the required input parameters (lines 6-9)
  3. Constructs the message with the appropriate structure (lines 11-30)

The implementation follows the established patterns for similar functionality in the codebase and properly handles input validation.

bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala (1)

405-407: Added new command message for fitToWidth setting.

The implementation adds the necessary message types to support the fitToWidth feature:

  1. SetPresentationFitToWidthCmdMsg object with a constant NAME
  2. Case class for the message extending StandardMsg
  3. Case class for the message body with userId, pageId, and fitToWidth fields

This follows the standard pattern for message definitions in the application and correctly implements all required components for the new feature.

bigbluebutton-html5/imports/ui/components/app/container.jsx (5)

2-2: No issues with the new import.
The usage of both useMutation and useReactiveVar is correct and aligns well with the rest of the code.


22-23: New GraphQL imports align with feature requirements.
The newly added mutation and query for fit-to-width functionality are correctly declared.


101-104: Good approach for defaulting page data.
Optional chaining and default fallbacks help prevent runtime errors when currentPageInfo is undefined.


128-129: Props forwarding looks correct.
Passing down fitToWidth and handlePresentationFitToWidth ensures the child component’s presentation display remains in sync.


31-34:

Details

✅ Verification successful

Consider verifying the subscription returns valid array data.
Your optional chaining is helpful for null safety, but ensure pres_page_curr is consistently an array.


🏁 Script executed:

#!/bin/bash
# Description: Verify that `pres_page_curr` is always an array
rg -A 5 pres_page_curr

Length of output: 11744


Verified: Subscription Data Structure is Correct

After reviewing the codebase, it’s clear that the subscription returning data for pres_page_curr is consistently handled as an array across multiple components (e.g., in app, whiteboard, presentation, webcam, and sidebar modules). The usage with optional chaining and array indexing (accessing [0]) confirms that the returned data type is valid. No further changes are needed.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1)

1-8: Imports and package structure are clear.
No issues found. The new package and imports are well-organized.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala (3)

30-31: New field added to the model.
Storing fitToWidth as a Boolean is straightforward. Ensure default values or migrations handle existing records gracefully.


57-57: Tuple mapping includes new field.
Including fitToWidth is consistent with the PresPageDbModel case class.


93-94: Properly inserting new field into the database.
Ensures fitToWidth is persisted on creation. No issues identified.

val maxImageHeight = column[Int]("maxImageHeight")
val uploadCompleted = column[Boolean]("uploadCompleted")
val infiniteWhiteboard = column[Boolean]("infiniteWhiteboard")
val fitToWidth = column[Boolean]("fitToWidth")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Confirm database migrations for the new column.
A default value or migration script may be required to prevent errors on existing rows.


🏁 Script executed:

#!/bin/bash
# Description: Verify the `fitToWidth` column presence and default in the DB schema
rg -A 5 fitToWidth --glob '*.sql'

Length of output: 1386


Database Migration and Default Value Confirmation Needed

Based on the verification, the SQL schema in bbb-graphql-server/bbb_schema.sql defines the "fitToWidth" column as a boolean without an accompanying default value. Since the DAO mapping in akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala treats it as a non-nullable Boolean, please ensure that a migration path is provided for existing rows to avoid potential errors. This could involve either:

  • Adding a default value in the schema migration, or
  • Implementing a migration script to backfill existing rows with an appropriate value.

Please confirm that one of these approaches has been or will be implemented.

@antobinary antobinary added this to the Release 3.0 milestone Mar 11, 2025
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
record-and-playback/core/lib/recordandplayback/generators/events.rb (1)

1170-1185: Good implementation of the new event extraction method

The new method get_screenshare_as_content_events successfully extracts SetScreenshareAsContentEvent events from the provided XML, which appears to be related to the "Fit to Width" feature mentioned in the PR objectives.

Some minor style improvements suggested:

  • Use single quotes for strings without interpolation
  • Add a trailing comma after the last hash item for better git diff when adding new items later
- BigBlueButton.logger.info("Extracting SetScreenshareAsContentEvent")
+ BigBlueButton.logger.info('Extracting SetScreenshareAsContentEvent')

- screenshareAsContent: event.at_xpath('screenshareAsContent')&.text == "true"
+ screenshareAsContent: event.at_xpath('screenshareAsContent')&.text == "true",
🧰 Tools
🪛 RuboCop (1.73)

[convention] 1171-1171: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 1180-1180: Put a comma after the last item of a multiline hash.

(Style/TrailingCommaInHashLiteral)


[convention] 1180-1180: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)

record-and-playback/presentation/scripts/publish/presentation.rb (1)

1299-1315: Implementation properly handles screenshare content events

The process_swap_events method properly integrates with the newly added get_screenshare_as_content_events method to extract and process screenshare content events. This is a key component for persisting the "Fit to Width" setting between presenter changes as described in the PR objectives.

Some minor style improvements suggested:

  • Use single quotes for strings without interpolation
  • Remove the trailing comma in method arguments
  • Remove extra blank lines at the end of the method
- BigBlueButton.logger.info("Processing screenshare as content events")
+ BigBlueButton.logger.info('Processing screenshare as content events')

- show_screenshare: event[:screenshareAsContent],
+ show_screenshare: event[:screenshareAsContent]

- 

- 
🧰 Tools
🪛 RuboCop (1.73)

[convention] 1300-1300: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 1309-1309: Avoid comma after the last parameter of a method call.

(Style/TrailingCommaInArguments)


[convention] 1314-1315: Extra blank line detected.

(Layout/EmptyLines)


[convention] 1314-1315: Extra empty line detected at method body end.

(Layout/EmptyLinesAroundMethodBody)

bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (2)

131-162: Well-structured container component with proper error handling

The new ConnectionStatusContainer follows the container pattern effectively by:

  • Handling data fetching logic
  • Managing loading and error states
  • Passing only the necessary data to the presentational component

However, there's a minor inconsistency in the log code naming.

-        logCode: 'subscription_Failed',
+        logCode: 'subscription_failed',

This change would maintain consistency with other log codes in the file that use lowercase.


1-164: Consider documenting the relation to "Fit to Width" functionality

While the code changes follow good React patterns for separation of concerns, it's not immediately clear how this connection status component refactoring relates to the PR objective of persisting "Fit to Width" settings between presenter changes. Consider adding a brief comment explaining this relationship for better maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 411cd43 and 4cc765c.

⛔ Files ignored due to path filters (3)
  • bbb-graphql-actions/package-lock.json is excluded by !**/package-lock.json
  • bbb-learning-dashboard/package-lock.json is excluded by !**/package-lock.json
  • bigbluebutton-html5/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/ScreenshareAsContenthdlrHelper.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/SetScreenshareAsContentEvent.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (2 hunks)
  • bbb-graphql-actions/package.json (1 hunks)
  • bbb-learning-dashboard/package.json (1 hunks)
  • bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (4 hunks)
  • bigbluebutton-html5/imports/ui/components/notes/component.tsx (1 hunks)
  • bigbluebutton-html5/package.json (2 hunks)
  • record-and-playback/core/lib/recordandplayback/generators/events.rb (1 hunks)
  • record-and-playback/presentation/scripts/publish/presentation.rb (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • bbb-learning-dashboard/package.json
🧰 Additional context used
🪛 RuboCop (1.73)
record-and-playback/core/lib/recordandplayback/generators/events.rb

[convention] 1171-1171: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 1180-1180: Put a comma after the last item of a multiline hash.

(Style/TrailingCommaInHashLiteral)


[convention] 1180-1180: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)

record-and-playback/presentation/scripts/publish/presentation.rb

[convention] 1300-1300: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 1309-1309: Avoid comma after the last parameter of a method call.

(Style/TrailingCommaInArguments)


[convention] 1314-1315: Extra blank line detected.

(Layout/EmptyLines)


[convention] 1314-1315: Extra empty line detected at method body end.

(Layout/EmptyLinesAroundMethodBody)

🔇 Additional comments (19)
bbb-graphql-actions/package.json (1)

33-33: Dependency Version Update – Verify Compatibility

The update of the "redis" dependency version to "^4.7.0" appears to be a straightforward upgrade. Please verify that any API changes or deprecation notices between ^4.6.10 and ^4.7.0 have been accounted for, especially if there are interactions with redis elsewhere in the codebase. It would be good to run integration tests that involve redis functionality to ensure nothing is broken by this update.

bigbluebutton-html5/imports/ui/components/notes/component.tsx (1)

161-162: Good additions for testability and component clarity

Adding data-test="notesHeader" improves testability by providing a clear selector for automated tests. Setting rightButtonProps={null} explicitly clarifies that no default right button should be rendered, working together with the customRightButton prop that renders the NotesDropdown component. These changes enhance the component's clarity and maintainability.

record-and-playback/presentation/scripts/publish/presentation.rb (3)

1322-1322: Added new filename constant for layout XML

The addition of @layout_xml_filename variable supports the new functionality to persist layout settings across presenter changes.


1482-1483: Good integration of new functionality

The new call to process_swap_events(@doc) properly integrates the new functionality into the existing workflow.


1490-1491: Added proper file output for layout XML

The code now correctly writes the layout XML to a file, ensuring the "Fit to Width" setting is persisted between presenter changes.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala (1)

88-88: Changed default value for screenshareAsContent to false

This change modifies the default state of screenshare content handling, ensuring that screenshare is not automatically treated as content unless explicitly set. This aligns with the PR objective to better manage state persistence between presenter changes.

akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (2)

124-124: Added handling for SetScreenshareAsContentEvtMsg

Good addition of the case statement to handle the SetScreenshareAsContentEvtMsg event, which forwards to the new handler method.


775-779: Implementation of SetScreenshareAsContent handler

Well-implemented handler that records the screenshare as content state changes in Redis. This is crucial for persisting the state between presenter changes, aligning with the PR objective.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (2)

5-5: Added necessary imports for permission handling

Good addition of the imports for PermissionCheck and RightsManagementTrait, which are used in the permission validation logic.


27-27: Refactored to use ScreenshareAsContenthdlrHelper

Good refactoring to use the helper class for sending the message. This promotes code reuse and maintainability by centralizing the message sending logic.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (2)

4-4: Added imports for helper class and presenter finding

Appropriate imports for the new functionality to find presenters and use the shared helper method.

Also applies to: 9-9


66-74: Optimized screenshare content handling with presenter notification

Excellent enhancement to:

  1. Check if screenshare is already set as content before updating
  2. Only perform the database update when necessary
  3. Notify all presenters about the change

This improvement directly addresses the PR objective of ensuring that the 'Fit to Width' state is persisted between presenter changes by making sure all presenters are informed of the current state.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/SetScreenshareAsContentEvent.scala (1)

3-15: Well-structured refactoring of the screenshare content event class.

The implementation properly extends AbstractParticipantRecordEvent and provides a clean way to record screenshare content settings. The companion object with the constant definition is a good practice for maintaining string literals.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/ScreenshareAsContenthdlrHelper.scala (1)

1-28: Clean implementation of the helper object for screenshare content events.

The helper object properly encapsulates the message creation and sending logic, following Scala best practices. This implementation supports the PR objective of persisting presentation settings between presenter changes by providing a standardized way to broadcast screenshare content status.

A few observations:

  1. Good use of named parameters for clarity
  2. Proper separation of message construction from sending
  3. Clean organization of imports and method structure
bigbluebutton-html5/package.json (2)

56-56: Updated Axios Version
The axios dependency has been bumped to ^1.8.2. Please verify that this update remains backward-compatible with the existing HTTP communication patterns in the client. Reviewing the axios changelog for any breaking changes would be advisable.


103-103: Updated Recharts Version
The recharts dependency is updated to ^2.15.1. Ensure that any API changes in Recharts between versions 2.7.2 and 2.15.1 are properly handled in the UI components that rely on it. Testing visual components for regression is recommended.

bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (3)

14-16: Component refactoring follows React best practices

The refactored ConnectionStatus component now properly accepts user data via props instead of fetching it internally. This separation of concerns improves component reusability and testability.


64-64: Properly adapted to use the user prop

The component now correctly uses the passed user prop in the addUserNetworkHistory method, which aligns with the component refactoring.


164-164: Export update maintains API compatibility

Updating the default export to the container component is the correct approach to maintain the same import signature for consumers of this module.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bbb-playback.placeholder.sh (1)

1-1: Add a Shebang to Specify the Shell Interpreter.

A shebang (e.g. #!/bin/bash) at the top of the script ensures that the intended shell is used, which resolves the static analysis warning (SC2148) and provides consistency across environments.

Apply the following diff:

+#!/bin/bash
 git clone --branch v5.3.0 --depth 1 https://github.com/bigbluebutton/bbb-playback bbb-playback
🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4cc765c and 107262c.

⛔ Files ignored due to path filters (8)
  • bbb-graphql-actions/package-lock.json is excluded by !**/package-lock.json
  • bbb-learning-dashboard/package-lock.json is excluded by !**/package-lock.json
  • bbb-export-annotations/package-lock.json is excluded by !**/package-lock.json
  • bbb-graphql-actions/package-lock.json is excluded by !**/package-lock.json
  • bbb-graphql-client-test/package-lock.json is excluded by !**/package-lock.json
  • bbb-learning-dashboard/package-lock.json is excluded by !**/package-lock.json
  • bigbluebutton-tests/playwright/package-lock.json is excluded by !**/package-lock.json
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (3 hunks)
  • bbb-graphql-actions/package.json (1 hunks)
  • akka-bbb-apps/src/templates/systemloader/systemd/start-template (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java (4 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java (5 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationConversionCompletionService.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationFileProcessor.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/S3FileManager.java (1 hunks)
  • bbb-export-annotations/package.json (1 hunks)
  • bbb-graphql-actions/package.json (1 hunks)
  • bbb-graphql-middleware/internal/websrv/connhandler.go (1 hunks)
  • bbb-playback.placeholder.sh (1 hunks)
  • bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/component.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (1 hunks)
  • bigbluebutton-html5/public/locales/ja.json (1 hunks)
  • bigbluebutton-tests/playwright/package.json (1 hunks)
  • bigbluebutton-web/grails-app/conf/spring/doc-conversion.xml (0 hunks)
  • bigbluebutton-web/grails-app/conf/spring/resources.xml (1 hunks)
💤 Files with no reviewable changes (1)
  • bigbluebutton-web/grails-app/conf/spring/doc-conversion.xml
🚧 Files skipped from review as they are similar to previous changes (4)
  • bbb-graphql-actions/package.json
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
  • bbb-graphql-actions/package.json
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
🧰 Additional context used
🪛 Shellcheck (0.10.0)
bbb-playback.placeholder.sh

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (23)
bigbluebutton-tests/playwright/package.json (1)

14-14: Upgrade: Verify the axios dependency update.

The dependency "axios": "^1.8.2" has been updated from its previous version. This change is consistent with similar updates in the repository and should help maintain a uniform dependency version across projects. Please ensure that any integrations and tests involving axios are verified against this new version.

bbb-export-annotations/package.json (1)

12-12: Update Confirmation: Consistent axios dependency.

The upgrade of axios to "^1.8.2" aligns with the same change made in other parts of the codebase. Verify that the new version does not introduce breaking changes, particularly in any HTTP request handling or error behavior in this module.

bbb-graphql-middleware/internal/websrv/connhandler.go (1)

72-76: Improved error handling for unauthorized WebSocket connections.

The added code properly handles unauthorized connection attempts by sending a clear HTTP 403 Forbidden error response to the client and terminating the function when a WebSocket connection cannot be established due to origin authorization issues.

This enhancement:

  • Provides better feedback to clients about why their connection was rejected
  • Prevents further execution when authorization fails
  • Uses the appropriate HTTP status code for authorization failures
akka-bbb-apps/src/templates/systemloader/systemd/start-template (1)

23-23: Approved: Increasing file descriptor limit improves service reliability.

The change increases the maximum number of open file descriptors (LimitNOFILE) from 1024 to 4096, which is a beneficial improvement. This higher limit allows the BigBlueButton Apps service to handle more concurrent connections and I/O operations, reducing the likelihood of "too many open files" errors, especially when managing presentation states across multiple users. This change supports the PR's objective by ensuring the backend has sufficient resources to persist presentation settings between presenter changes.

bigbluebutton-html5/public/locales/ja.json (1)

1088-1088: Clarification on Touch Gesture Localization Update.

The updated string for "app.shortcut-help.gesture" replaces the generic "タッチジェスチャー" with "タッチ操作 (ホワイトボード)". This change clearly indicates that the touch-based gesture is specifically related to whiteboard functionality, which improves user comprehension in the context of the recent presentation management enhancements.

bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/component.tsx (1)

234-234: Improved React key implementation

Changing from using createdAt timestamp to messageId as the key prop is a better practice for React's reconciliation process. This ensures unique identification of chat messages even if multiple messages share the same timestamp.

bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java (1)

83-83: LGTM! Added constant for presentation conversion cache configuration.

The addition of the PRESENTATION_CONVERSION_CACHE_ENABLED constant follows the established pattern in this file and will be used as a key for configuration parameters.

bigbluebutton-web/grails-app/conf/spring/resources.xml (1)

159-159: LGTM! Added property injection for presentation conversion cache.

The addition of the presentationConversionCacheEnabled property to the paramsProcessorUtil bean follows the correct pattern and allows the application to configure the presentation conversion cache feature.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationFileProcessor.java (2)

7-8: LGTM! Added necessary imports for Meeting dependency.

These imports support the new meeting-specific approach to checking presentation conversion cache settings.


62-68: LGTM! Improved cache check to use meeting-specific settings.

The code now properly extracts the meeting ID and uses it to retrieve the Meeting object to check if presentation conversion cache is enabled for that specific meeting. This approach allows for more granular control over caching on a per-meeting basis.

bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java (4)

92-92: LGTM! Added field for presentation conversion cache.

This field will store the default presentation conversion cache setting.


547-557: LGTM! Added parameter processing for presentation cache configuration.

The code properly parses the PRESENTATION_CONVERSION_CACHE_ENABLED parameter with appropriate error handling and logging.


811-811: LGTM! Added cache configuration to Meeting builder.

The presentation conversion cache setting is now correctly passed to the Meeting object during creation.


1366-1368: LGTM! Added setter for presentation conversion cache configuration.

This setter method allows the Spring framework to inject the configuration value into the ParamsProcessorUtil instance.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationConversionCompletionService.java (3)

4-5: Appropriate new import additions.

The added imports for Meeting and ServiceUtils are necessary for the refactored cache enablement check that follows.


84-84: Good code extraction for readability.

Extracting the meeting ID into a named variable improves code readability before using it to retrieve the meeting object.


89-90: Architectural improvement: Cache enablement check moved to Meeting object.

The change properly relocates the presentation conversion cache enablement check from the S3FileManager to the Meeting object. This aligns with the PR objective of making presentation settings (like "Fit to Width") persist across presenter changes by making such settings part of the meeting state rather than client-side only.

bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java (5)

72-72: Appropriate addition of new state flag.

Adding the presentationConversionCacheEnabled field to the Meeting class follows the established pattern for meeting configuration flags and properly initializes it with a default value.


166-166: Constructor correctly initializes the new field.

The constructor properly sets the new field from the builder parameter, maintaining consistency with the existing code pattern.


657-659: Well-named getter for the new field.

The getter method follows Java conventions with the 'is' prefix for boolean properties and maintains consistency with the rest of the class.


967-967: Builder pattern implementation: Added field to Builder class.

The field addition to the Builder class is consistent with the design pattern used throughout this class.


1051-1054: Complete Builder pattern implementation with fluent method.

The addition of the withPresentationConversionCacheEnabled method properly follows the builder pattern and fluent interface style used in the rest of the class.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/S3FileManager.java (1)

30-30: Improved S3 client initialization condition.

The condition for initializing the S3 client has been changed to check if the endpoint URL is not empty, rather than relying on a separate cache enablement flag. This properly decouples the S3 client initialization from the presentation conversion cache setting (which has been moved to the Meeting class), making the code more focused and maintainable.

msg: SetPresentationFitToWidthCmdMsg, state: MeetingState2x,
liveMeeting: LiveMeeting, bus: MessageBus
): MeetingState2x = {
if (liveMeeting.props.meetingProp.disabledFeatures.contains("infiniteWhiteboard")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why check infiniteWhiteboard?

Comment on lines +3 to +10
export const GET_CURR_PRESS_PAGE_INFO = gql`
subscription MySubscription {
pres_page_curr {
fitToWidth
pageId
}
}
`;

@gustavotrott gustavotrott Mar 11, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it really necessary a new subscription dedicated for this prop?

Try to use the existing subscription CurrentPresentationPagesSubscription {.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reference

I sent a fix for it

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml (1)

27-27: Reorganized Column Permission: infiniteWhiteboard
The reordering of infiniteWhiteboard in the columns list reflects a shift in its placement relative to the new fitToWidth field. While YAML lists typically do not enforce order on permission checks, please ensure that this change is consistent with any documentation and does not affect dependent queries or mappings.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 107262c and 027b9f3.

📒 Files selected for processing (3)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1 hunks)
  • bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml (1 hunks)
  • bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page_curr.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (2)
bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page_curr.yaml (1)

17-17: Added Column Permission: fitToWidth
The addition of the fitToWidth column for the bbb_client role is aligned with the new functionality for persisting the "Fit to Width" state. Please verify that the underlying view and database schema include this column to ensure full consistency across the system.

bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml (1)

24-24: New Column Permission: fitToWidth
Including the fitToWidth column in the permission list ensures that clients can retrieve the persisted fit-to-width state. Confirm that the view returns this column and that it is correctly mapped in the data model.

@gustavotrott

Copy link
Copy Markdown
Contributor

Looks like the viewer zoom is not following the presenter zoom properly when I open the chat panel, in the video I show the problem with your PR and then I try in other server without your PR (from 0:37):

Screencast.from.2025-03-12.11-04-36.mp4

@gustavotrott

Copy link
Copy Markdown
Contributor

Every time I change the page it sends two mutations setting fitToWidth: false for the previous page and fitToWidth: true for the new current page:
image

I don't see it as a good strategy, if fitToWidth is a prop of the presentation it should be part of the pres_presentation and not pres_page.

@Tainan404

Copy link
Copy Markdown
Member Author

Every time I change the page it sends two mutations setting fitToWidth: false for the previous page and fitToWidth: true for the new current page: image

I don't see it as a good strategy, if fitToWidth is a prop of the presentation it should be part of the pres_presentation and not pres_page.

I think the fit to width should disable, when changing slides, like in infinite whiteboard, so this behavior was not intended, I'll fix it

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/app/container.jsx (1)

50-52: Simplify conditional expression

The ternary operator here can be simplified for better readability and to address the linting warning.

- // eslint-disable-next-line no-unneeded-ternary
- skip: currentUser?.presenter ? false : true,
+ skip: !currentUser?.presenter,
🧰 Tools
🪛 Biome (1.9.4)

[error] 52-52: Unnecessary use of boolean literals in conditional expression.

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with

(lint/complexity/noUselessTernary)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5ff6d5 and 4105778.

📒 Files selected for processing (2)
  • bigbluebutton-html5/imports/ui/components/app/container.jsx (6 hunks)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx (0 hunks)
💤 Files with no reviewable changes (1)
  • bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx
🧰 Additional context used
🪛 Biome (1.9.4)
bigbluebutton-html5/imports/ui/components/app/container.jsx

[error] 52-52: Unnecessary use of boolean literals in conditional expression.

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with

(lint/complexity/noUselessTernary)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-fsesl-akka)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
  • GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (3)
bigbluebutton-html5/imports/ui/components/app/container.jsx (3)

106-108: LGTM! Good defensive programming

Nice use of nullish coalescing operators to provide default values, which helps prevent potential runtime errors when dealing with optional data from the subscription.


110-117: LGTM! Appropriate mutation handler implementation

The handlePresentationFitToWidth function is well-implemented, correctly passing the page ID and fitToWidth value to the mutation.


133-134: LGTM! Successfully implementing "Fit to Width" persistence

These prop additions successfully implement the PR objective of persisting the "Fit to Width" setting between presenter changes, by passing both the current state and the handler function to the App component.

@sonarqubecloud

Copy link
Copy Markdown

@gustavotrott

Copy link
Copy Markdown
Contributor

Sometimes I come back to the previous page (page 1, that has fit-to-width applied) and the zoom of the viewer is wrong:

Screencast.from.2025-03-12.16-36-03.mp4

@github-actions

Copy link
Copy Markdown

Automated tests Summary

🚨 Test workflow has failed


Click here to check the action test reports (to view the report locally, see the docs)

@Tainan404

Copy link
Copy Markdown
Member Author

Sometimes I come back to the previous page (page 1, that has fit-to-width applied) and the zoom of the viewer is wrong:

Screencast.from.2025-03-12.16-36-03.mp4

I think this bug isn't related with this PR, I was able to reproduce it switching between slides with different orientations on a bit busy setup (running a lot of proccess on parallel), looks like some race condition on zoom calculation.
Screencast from 13-03-2025 10:04:38.webm

@gustavotrott

Copy link
Copy Markdown
Contributor

Sometimes I come back to the previous page (page 1, that has fit-to-width applied) and the zoom of the viewer is wrong:
Screencast.from.2025-03-12.16-36-03.mp4

I think this bug isn't related with this PR, I was able to reproduce it switching between slides with different orientations on a bit busy setup (running a lot of proccess on parallel), looks like some race condition on zoom calculation. Screencast from 13-03-2025 10:04:38.webm

Alright, thanks for checking this out!

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.

Change of presenter resets scaling (zoom in / fit to width)

4 participants