8000 refactor: Allow isolated headlines/intros in the form (backport #31459) by mergify[bot] · Pull Request #31493 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: Allow isolated headlines/intros in the form (backport #31459) #31493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented Mar 3, 2025

Issue

  • show_message groups all headlines passed to it and assumes the state of the last headline
  • The first headline is supposed to be a blue headline
  • The second is supposed to be a yellow headline
    Screenshot 2025-03-04 at 9 59 14 PM

Yet they are grouped -> the intent is completely ignored -> the outcome isn't what was expected
An independently set headline can't stand out and the message is lost when grouped with another headline

Proposed Fix

  • Each attempt to show_message should be rendered as a separate block with its own color and close button
    Screenshot 2025-03-04 at 9 47 49 PM

  • Removal affects the right headline
    2025-03-04 9 48 12 PM

  • Headlines with HTML passed
    Screenshot 2025-03-04 at 10 30 08 PM

  • Restructure: .form-message-container contains .form-message blocks


This is an automatic backport of pull request #31459 done by [Mergify](https://mergify.com).

permanent headlines are not backported to v15 yet

* refactor: Allow isolated headlines/intros in the form

- Each attempt to `show_message` should be rendered as a separate block with its own color and close button
- When grouped together the point of passing individual colors is lost
- The grouping behaviour also seemed implicit.
- An independently set headline could never stand out and the message is lost when grouped with another headline

* fix: Pull docstring out + avoid deprecated "substr" + Border Bottom

* chore: Add color options for color param in `show_message` docstring

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit 2022ddf)

# Conflicts:
#	frappe/public/js/frappe/form/layout.js
@mergify mergify bot added the conflicts label Mar 3, 2025

This comment was marked as resolved.

- chore: Also remove `border-bottom` and reduce margin-bottom due to v15's design
@marination marination merged commit 358a943 into version-15-hotfix Mar 6, 2025
17 checks passed
@marination marination deleted the mergify/bp/version-15-hotfix/pr-31459 branch March 6, 2025 16:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0