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

Improve styling for /digest page #11016

Closed
timabbott opened this issue Dec 11, 2018 · 8 comments
Closed

Improve styling for /digest page #11016

timabbott opened this issue Dec 11, 2018 · 8 comments

Comments

@timabbott
Copy link
Sponsor Member

The /digest page (see #9974) is primarily for development/testing of Zulip's digest emails, but even so, it'd be great to restructure it to have a container around the email body, centering it, etc. Might be able to borrow some logic from the /emails page for this.

@zulipbot
Copy link
Member

Hello @zulip/server-development members, this issue was labeled with the "area: emails" label, so you may want to check it out!

@Shoumorup
Copy link
Collaborator

@zulipbot claim

@Shoumorup
Copy link
Collaborator

Shoumorup commented Dec 19, 2018

Hey @timabbott ! Just a few trivial questions.
This issue essentially wants to address that:

  1. All hard-coded css presently in templates/zerver/emails/compiled/digest.html be removed to a separate digest.css file (Similar to email.css)?
    This digest.css file be called from another python script similar to tools/inline-email-css?

OR
2. Is it just a correction of the css in the templates/zerver/emails/compiled/digest.html file so that it'd look a bit better?

I'm confused because i'm referring to /emails which uses templates/zerver/email_log.html which is more of a dev experience while "digest.html" should be more of an user experience (I'm presuming). I personally feel that correcting the css in digest.html should do as the file is already using email.css through inline-email-css.

Is this correct or you aim to address something else that i might be missing?

Sorry for the constant nagging

@Shoumorup
Copy link
Collaborator

@timabbott Can you please review it?
https://github.com/zulip/zulip/pull/11095

@hackerkid
Copy link
Member

hackerkid commented Dec 24, 2018

@Shoumorup

All hard-coded css presently in templates/zerver/emails/compiled/digest.html be removed to a separate digest.css file (Similar to email.css)?

So digest.html is generated automatically from templates/zerver/emails/digest.source.html while running ./tools/inline-email-css. You dont have to seperate the CSS again. The CSS is seperated and already stored in templates/zerver/emails/email.csss

The issue is about improving the /digest page. By improving /digest page it means to improve how the digest email is displayed in /digest page and not the content of digest email. So dont make any changes to digest.source.html, digest.html, email.css etc.

zerver/views/digest.py has the view which handles /digest page. Currently it just returns digest.html as the response. You need to make the styling look similiar to /emails page. For that you have to probably display the content of digest.html in another template. See email_log.html for example. The content is passed to email_log.html as variable log. In your case the content would be the rendered digest.html email in zerver/views/digest.py. If you have any further doubts ask in chat.zulip.org.

@Shoumorup
Copy link
Collaborator

Shoumorup commented Dec 29, 2018

https://github.com/zulip/zulip/pull/11147

@timabbott @hackerkid Do you want anything really fancy or minimalistic? Is it required to add a link in the alert that would take the person back to the intended conversation page from the /digest page?

Does the simple "include" of zerver/emails/compiled/digest.html seem okay or do you want to similar to the "log" manner in which email_content.log renders it's content?

@hackerkid
Copy link
Member

hackerkid commented Dec 29, 2018

@Shoumorup You don't want to add any extra features.

The /digest page (see #9974) is primarily for development/testing of Zulip's digest emails, but even so, it'd be great to restructure it to have a container around the email body, centering it, etc.

Focus only on this. If you compare the /emails and /digest page its obvious that the styling looks kind of broken in /digest page. You just have to make it look better without touching the styling of the actual email aka email.css :)

Shoumorup added a commit to Shoumorup/zulip that referenced this issue Jan 6, 2019
The styling of /digest seemed broken, especially
when compared to /emails page.

This commit adds pop-ups, portico headers and footers,few static image
files and some css to style the page better- such as containerizing,
centering the content etc.

Fixes: zulip#11016.
Shoumorup added a commit to Shoumorup/zulip that referenced this issue Jan 7, 2019
The styling of /digest seemed broken, especially
when compared to /emails page.

This commit adds pop-ups, portico headers and footers,few static image
files and some css to style the page better- such as containerizing,
centering the content etc.

Fixes: zulip#11016.
Shoumorup added a commit to Shoumorup/zulip that referenced this issue Jan 7, 2019
The styling of /digest seemed broken, especially
when compared to /emails page.

This commit adds pop-ups, portico headers and footers,few static image
files and some css to style the page better- such as containerizing,
centering the content etc.

Fixes: zulip#11016.
@timabbott
Copy link
Sponsor Member Author

@jmandel FYI this is now a way one can see the what the digest emails look like for iterating on the content, which I recall was an FHIR request.

TharunThomas8 pushed a commit to TharunThomas8/zulip that referenced this issue Jan 26, 2019
This adds a proper template for the /digest page, making it a
reasonable way to view the digest email content for development and
debugging.

Fixes: zulip#11016.
vrongmeal pushed a commit to vrongmeal/zulip that referenced this issue Feb 13, 2019
This adds a proper template for the /digest page, making it a
reasonable way to view the digest email content for development and
debugging.

Fixes: zulip#11016.
ruchit2801 pushed a commit to ruchit2801/zulip that referenced this issue Feb 13, 2019
This adds a proper template for the /digest page, making it a
reasonable way to view the digest email content for development and
debugging.

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

No branches or pull requests

4 participants