プロジェクト

全般

プロフィール

Vote #79896

完了

Preformatted text overflows the preview area

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
148
issue_org_id:
30988
author_id:
259873
assigned_to_id:
1
comments:
9
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Like the image below, the pre tag overflows from the preview tab.

!{width: 70%; border: 1px solid #ccc}note.png!


journals

The following changes solves this problem.
<pre><code class="diff">
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 3afaee4ca9..1282c8113c 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -28,7 +28,7 @@
</fieldset>
<% end %>
<% if @issue.notes_addable? %>
- <fieldset><legend><%= l(:field_notes) %></legend>
+ <fieldset id='new-note'><legend><%= l(:field_notes) %></legend>
<%= f.text_area :notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :no_label => true %>
<%= wikitoolbar_for 'issue_notes', preview_issue_path(:project_id => @project, :issue_id => @issue) %>

diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 7dde120079..ad6383a427 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -536,6 +536,8 @@ div.journal h4 img.gravatar {margin-left:-32px;}

#history div:target h4 {background-color:#DDEEFF;}

+#update fieldset#new-note { min-inline-size: auto; }
+
div#activity dl, #search-results { margin-left: 2em; }
div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
div#activity dt.me .time { border-bottom: 1px solid #999; }

</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Marius, could you review this fix?
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Marius, could you review this fix?

Looking right now, maybe we can include the fix for this issue in the next release (version:"4.0.3").
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Go MAEDA wrote:
> > Marius, could you review this fix?
>
> Looking right now, maybe we can include the fix for this issue in the next release (version:"4.0.3").

Thanks. Setting the target version to 4.0.3.
--------------------------------------------------------------------------------
The proposed patch is not enough, it only fixes the issue in the notes block.

The description is also affected, please the below screenshot:
!description.png!

The old fix before Edit/Preview tabs was the rule @'min-width': inherit;@ from below:
<pre><code class="css">
fieldset.preview {
margin-top: 1em;
min-width: inherit;
background: url(../images/draft.png);
}
</code></pre>

My proposal is to backport the fix to all fieldset elements:
<pre><code class="diff">
vagrant@jessie:/vagrant/project/redmine$ git diff
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 7dde120..15b32df 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -455,7 +455,7 @@ div.square {
form {display: inline;}
input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
input[type="submit"] { -webkit-appearance: button; }
-fieldset {border: 1px solid #e4e4e4; margin:0;}
+fieldset {border: 1px solid #e4e4e4; margin:0; min-width: inherit;}
legend {color: #333;}
hr { width: 100%; height: 1px; background: #ccc; border: 0;}
blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 0;}
</code></pre>

I've tested in various pages in Chrome and I didn't see any issue, but any feedback is welcome.


--------------------------------------------------------------------------------
Marius's patch looks like a good option, it's committed. Thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,27758,Adds preview option to the wiki toolbar

Admin Redmine さんが3年以上前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン4.0.3_148 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0