Skip to content
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

AO3-4842 Add <br /> between paragraphs for Support and PAC tickets #3383

Merged
merged 3 commits into from
Jul 13, 2018

Conversation

sarken
Copy link
Collaborator

@sarken sarken commented Jul 13, 2018

Issue

https://otwarchive.atlassian.net/browse/AO3-4842

Purpose

Adds a <br /> between the paragraphs in Support and PAC tickets because the ticket tracker's paragraph styling doesn't have margins, so the paragraphs looked more like:

Paragraph 1
Paragraph 2

than like

Paragraph 1

Paragraph 2

even though they were correctly HTMLified as <p>Paragraph 1</p><p>Paragraph 2</p>

They are now rather horrifically done as <p>Paragraph 1</p><br /><p>Paragraph 2</p> because a single empty <p></p> did not have sufficient line height to resemble a blank line, and &nbsp; or &#160; caused the tickets not to make it to the tracker, while an actual typed out space would get stripped and go right back to the line height not resembling a blank line.

Testing

Refer to Jira

@@ -398,4 +398,8 @@ def strip_html_breaks_simple(value)
strip
end

def double_html_paragraphs(value)
return "" if value.blank?
value.gsub(/\s*<\/p>\s*<p>s*/, "</p><p>&nbsp;</p><p>")

Choose a reason for hiding this comment

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

Style/RegexpLiteral: Use %r around regular expression.

@@ -20,6 +20,10 @@ def title
strip_html_breaks_simple(@title)
end

def description

Choose a reason for hiding this comment

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

Lint/DuplicateMethods: Method FeedbackReporter#description is defined at both app/models/feedback_reporters/feedback_reporter.rb:5 and app/models/feedback_reporters/feedback_reporter.rb:23.

@sarken sarken added the Priority: High - Broken on Test Merge immediately after approval label Jul 13, 2018
@sarken sarken closed this Jul 13, 2018
@sarken sarken reopened this Jul 13, 2018
@sarken sarken changed the title AO3-4842 Add extra paragraphs to make up for Zoho's lack of margins AO3-4842 Add <br /> between paragraphs for Support and PAC tickets Jul 13, 2018
@scottsds
Copy link
Member

Looks good! 👍 Thank you for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants