Skip to content

Add Common Speech Balloon Layout Styles with Compatibility for Latest Redmine (After Redmine 6.0) - #126

Closed
ishikawa999 wants to merge 1 commit into
masterfrom
fix/speech-balloon-styles
Closed

ishikawa999 wants to merge 1 commit into
masterfrom
fix/speech-balloon-styles

Conversation

@ishikawa999

@ishikawa999 ishikawa999 commented Jul 22, 2025 •

Copy link
Copy Markdown
Collaborator

Due to changes in the HTML structure for history sections introduced in the following commit:
redmine/redmine@e940540
the speech balloon layout in the Bleuclair theme was no longer being applied correctly in some cases.

To address this, styles have been separated and organized to support both the latest Redmine (after Redmine 6.0) and Redmine 6.0.

A new shared style file, _speech_balloon_layout.scss, has been added to support the .journals class introduced in latest Redmine. This style is designed to be reused in Issues, News, and Forums.
For backward compatibility with Redmine 6.0, existing styles are now conditionally applied only when the .journals class is not present.

@ishikawa999
ishikawa999 requested a review from Copilot July 22, 2025 08:32

Copilot AI left a comment

Copy link
Copy Markdown

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 adapts the speech balloon (conversation timeline) layout styling to work with updated HTML structure in Redmine core, specifically for Redmine 6.0+ where the journal structure has changed. The changes ensure backwards compatibility while providing updated styling for the new structure.

  • Creates a shared speech balloon layout component that works with both old and new Redmine HTML structures
  • Updates existing components to use conditional selectors that disable old styles when new structure is present
  • Maintains visual consistency across different content types (issues, news, boards)

Reviewed Changes

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

Show a summary per file
File Description
stylesheets/theme.css Compiled CSS containing all the new styles and structure changes
src/styles/components/_speech_balloon_layout.scss New shared component for journal/comment timeline styling
src/styles/components/_news.scss Updated to use conditional styling and moved some styles up
src/styles/components/_issues.scss Refactored to use new shared component with backwards compatibility
src/styles/components/_boards.scss Added conditional selector for backwards compatibility
src/styles/bleuclair.scss Added import for the new speech balloon layout component

Comment thread src/styles/components/_news.scss Outdated
Comment thread src/styles/components/_issues.scss Outdated
Comment thread src/styles/components/_boards.scss Outdated
Comment thread src/styles/components/_speech_balloon_layout.scss
@ishikawa999
ishikawa999 force-pushed the fix/speech-balloon-styles branch from 98b7185 to 4c76916 Compare July 24, 2025 07:44
@ishikawa999
ishikawa999 force-pushed the fix/speech-balloon-styles branch from 4c76916 to 701c470 Compare July 24, 2025 08:49
@ishikawa999 ishikawa999 changed the title Adapt speech balloon layout to updated HTML structure in Redmine core Add Common Speech Balloon Layout Styles with Compatibility for Latest Redmine (After Redmine 6.0) Jul 24, 2025
// forum(board)

.controller-messages.action-show #content > div.message {
.controller-messages.action-show #content h2 + div.message {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Corresponding to changes in HTML structure

.issue-card {
background-color: $color-issue-bg;
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Move the code position so that it does not apply to /* After Redmine6.0 This is achieved by common styles in _speech_balloon_layout.scss. The :not(.journals) disables the following styles after Redmine 6.0 */

Comment thread src/styles/components/_news.scss Outdated
@@ -1,12 +1,22 @@
.controller-news.action-show {
#content > div.message {
#content div.news {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Corresponding to changes in HTML structure

padding: 20px;
border-radius: 3px;
border: 1px solid #dfe8f1;
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed a style definition for #content > div.message that was not working and fixed it to work in each version.
I also changed the news section to be displayed in white for the latest Redmine.

redmine 6.0 stable (with this bleuclair) Redmine trunk (with this bleuclair)
screenshot 2025-07-24 17 55 35 screenshot 2025-07-24 17 51 29

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In Redmine 6.0, the timeline line was not displayed for comments, but after unifying the styles in _speech_balloon_layout.scss, the line is now shown.
I believe it's fine as it is, since the absence of the timeline line in Redmine 6.0 was likely not intentional but rather an implementation oversight.

@ishikawa999
ishikawa999 marked this pull request as ready for review July 24, 2025 09:28
@ishikawa999
ishikawa999 requested a review from hidakatsuya July 24, 2025 09:28
@ishikawa999

Copy link
Copy Markdown
Collaborator Author

This pull request will be closed, and a new one will be created with changes that are incompatible with Redmine 6.0.

@ishikawa999 ishikawa999 closed this Aug 6, 2025
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