プロジェクト

全般

プロフィール

Vote #79030

完了

Preformatted text overflows in preview

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

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

0%

予定工数:
category_id:
2
version_id:
138
issue_org_id:
27862
author_id:
155917
assigned_to_id:
332
comments:
9
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
136
ステータス-->[Closed]

説明

If user uses pre in his note and the note has some long text, it overflows over the sidebar on the right.


journals

I should note this happens in the preview panel
--------------------------------------------------------------------------------
It is not preferable that the display at preview is different from the actual display.
I think adding this code will solve this problem.

<pre><code class="diff">
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index e194ccd78..385869fab 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -718,6 +718,7 @@ input#time_entry_comments { width: 90%;}
input#months { width: 30px; }

#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+fieldset.preview { min-width: inherit; }

.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</code></pre>

--------------------------------------------------------------------------------
I confirmed the problem and the patch submitted in #27862#note-2 works fine for me. But I think we can use the existing selector "#preview fieldset" instead of adding "fieldset.preview", don't we?

<pre><code class="diff">
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 17180)
+++ public/stylesheets/application.css (working copy)
@@ -717,7 +717,7 @@
input#time_entry_comments { width: 90%;}
input#months { width: 30px; }

-#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+#preview fieldset {margin-top: 1em; min-width: inherit; background: url(../images/draft.png)}

.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</pre></code>
--------------------------------------------------------------------------------
When using the selector "#preview fieldset", the style was not applied to the preview screen for editing existing notes.

Therefore, I prepared a new selector "fieldset.preview".
--------------------------------------------------------------------------------
Mizuki ISHIKAWA wrote:
> When using the selector "#preview fieldset", the style was not applied to the preview screen for editing existing notes.

Thank you for the explanation, I confirmed what you wrote. I noticed that the preview area when editing an existing note doesn't have "DRAFT" background image. Your patch also fixes that.

Maybe you can put the two lines of CSS together as follows. Mizuki, could you review this?

<pre><code class="diff">
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 17180)
+++ public/stylesheets/application.css (working copy)
@@ -717,7 +717,7 @@
input#time_entry_comments { width: 90%;}
input#months { width: 30px; }

-#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+fieldset.preview {margin-top: 1em; min-width: inherit; background: url(../images/draft.png)}

.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</code></pre>

--------------------------------------------------------------------------------
Go MAEDA wrote:
> I noticed that the preview area when editing an existing note doesn't have "DRAFT" background image. Your patch also fixes that.
>
> Maybe you can put the two lines of CSS together as follows. Mizuki, could you review this?
>

Thank you for fixing the code I wrote.
I confirmed that the code works as expected. This makes it possible to equalize the layout of the preview panel.
--------------------------------------------------------------------------------
I confirmed that the patch also works as expected for news and wiki.
Setting target version to 3.3.7.
--------------------------------------------------------------------------------
Committed. Thank you all for reporting and fixing this issue.
--------------------------------------------------------------------------------
Merged to stable branches.
--------------------------------------------------------------------------------

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

  • カテゴリIssues_2 にセット
  • 対象バージョン3.3.7_138 にセット

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

いいね!0
いいね!0