Skip to content

Implement h1-h5 #492

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 1 commit into from
Jan 31, 2024
Merged

Implement h1-h5 #492

merged 1 commit into from
Jan 31, 2024

Conversation

sirpengi
Copy link
Contributor

Fixes: #192

An unresolved issue in this PR is that headers at the beginning of a message should not have a top margin. See from
https://github.com/zulip/zulip/blob/main/web/styles/rendered_markdown.css :

    /* Headings: Ensure that messages that start with a heading don't have
       a weirdly blank area at the very start of the message. */
    & h1:first-child,
    h2:first-child,
    h3:first-child,
    h4:first-child,
    h5:first-child,
    h6:first-child {
        margin-top: 0;
    }

We have an open issue #162 to handle content layout where this should be addressed in the future.

Screenshot from android:

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks @sirpengi! Generally this looks good; one nit below, which I'll fix and then I'll merge.

An unresolved issue in this PR is that headers at the beginning of a message should not have a top margin. […] We have an open issue #162 to handle content layout where this should be addressed in the future.

Yeah, thanks for flagging this. I've just added a note about it on that issue: #162 (comment)

@@ -24,6 +24,26 @@ import 'page_checks.dart';
void main() {
TestZulipBinding.ensureInitialized();

group('Headings', () {
Copy link
Member

Choose a reason for hiding this comment

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

nit: just "Heading", so it agrees with the relevant identifier for the code under test

(Could also be "HeadingNode" — this test file has waffled on whether to name the tests after the widget classes that implement the tested features, or the ContentNode classes that represent them and that the widgets consume.)

@gnprice gnprice merged commit d413ffd into zulip:main Jan 31, 2024
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.

Handle headings <h1><h5>, as well as <h6>
2 participants