Skip to content

Conversation

@hatton
Copy link
Member

@hatton hatton commented Nov 19, 2025

This change is Reviewable

Copilot AI review requested due to automatic review settings November 19, 2025 17:51
@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BL-15212LangTags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

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 implements functionality to display language tags/codes in the edit interface, addressing BL-15212. The implementation uses a UI workaround since language code tooltips cannot be directly attached to pseudo-elements.

  • Adds language code display to the format toolbar title bar
  • Shows language tags as tooltips on source bubble tabs
  • Updates both the source bubbles and style editor components

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/BloomBrowserUI/bookEdit/sourceBubbles/BloomSourceBubbles.tsx Adds language tag as both id and title attributes to source text tab list items for tooltip display
src/BloomBrowserUI/bookEdit/StyleEditor/StyleEditor.ts Implements updateTitleBarLanguageCode() method to display language code in the format toolbar title bar
src/BloomBrowserUI/bookEdit/StyleEditor/StyleEditor.pug Restructures title bar to include a span element for displaying the language code
src/BloomBrowserUI/bookEdit/StyleEditor/StyleEditor.less Adds CSS styling to position and style the language code display in the title bar

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.bloomDialogTitleBar(data-i18n="EditTab.FormatDialog.Format") Format
.bloomDialogTitleBar
span(data-i18n="EditTab.FormatDialog.Format") Format
span#format-toolbar-lang-code
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The span#format-toolbar-lang-code element should have aria-hidden="true" as an initial attribute since it starts empty and will be hidden by updateTitleBarLanguageCode() when there's no language code. This prevents screen readers from announcing an empty element before the JavaScript initialization runs.

Suggested change
span#format-toolbar-lang-code
span#format-toolbar-lang-code(aria-hidden="true")

Copilot uses AI. Check for mistakes.
}

// this is an unfortunate ui hack because we can't yet put the language code as a tooltip on the language
// tag itself because it is a psuedo-element (BL-15212).
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

Spelling error: "psuedo-element" should be "pseudo-element".

Suggested change
// tag itself because it is a psuedo-element (BL-15212).
// tag itself because it is a pseudo-element (BL-15212).

Copilot uses AI. Check for mistakes.
}

// this is an unfortunate ui hack because we can't yet put the language code as a tooltip on the language
// tag itself because it is a psuedo-element. (BL-15212)
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

Spelling error: "psuedo-element" should be "pseudo-element".

Suggested change
// tag itself because it is a psuedo-element. (BL-15212)
// tag itself because it is a pseudo-element. (BL-15212)

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

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

@andrew-polk reviewed 4 of 4 files at r1, all commit messages.
@andrew-polk dismissed @copilot-pull-request-reviewer[bot] from a discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @hatton)

Copy link

Copilot AI commented Nov 20, 2025

@andrew-polk I've opened a new pull request, #7507, to work on those changes. Once the pull request is ready, I'll request review from you.

@andrew-polk andrew-polk merged commit 67d5d9f into master Nov 20, 2025
7 of 8 checks passed
@andrew-polk andrew-polk deleted the BL-15212LangTags branch November 20, 2025 18:01
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.

3 participants