-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add news and events carousel #2111
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2111 +/- ##
==========================================
+ Coverage 87.96% 87.97% +0.01%
==========================================
Files 328 328
Lines 14778 14819 +41
Branches 1032 1033 +1
==========================================
+ Hits 12999 13037 +38
- Misses 1540 1542 +2
- Partials 239 240 +1
Continue to review full report at Codecov.
|
d2a36d4
to
8c48bc9
Compare
8c48bc9
to
a27a056
Compare
@HamzaIbnFarooq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over all it seems me great beside few suggestions.
cms/blocks.py
Outdated
Custom block to represent a news or event | ||
""" | ||
|
||
content_type = blocks.CharBlock(max_length=100, help_text="The type of update.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I would prefer Specify the news/events type here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
cms/blocks.py
Outdated
""" | ||
|
||
content_type = blocks.CharBlock(max_length=100, help_text="The type of update.") | ||
title = blocks.CharBlock(max_length=255, help_text="The title of update.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I would prefer Specify the news/events title here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
cms/blocks.py
Outdated
content_type = blocks.CharBlock(max_length=100, help_text="The type of update.") | ||
title = blocks.CharBlock(max_length=255, help_text="The title of update.") | ||
image = ImageChooserBlock( | ||
blank=True, null=True, help_text="The image to display on the update." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I would prefer Specify the image for news/events section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
cms/blocks.py
Outdated
call_to_action = blocks.CharBlock( | ||
max_length=100, help_text="The call to action of update." | ||
) | ||
action_url = blocks.URLBlock(help_text="The call to action url of update.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an example here for the action_url
, I mean a bit more specific to new ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
blank=True, null=True, help_text="The image to display on the update." | ||
) | ||
content = blocks.TextBlock(help_text="The content that appears on the update card.") | ||
call_to_action = blocks.CharBlock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit more explanatory with any possible e.g.
value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
<img src="{% image_version_url card.value.image "fill-330x200" %}" alt="{{ card.value.name }}" width="330" height="200" loading="lazy"/> | ||
{% endif %} | ||
<div class="card-type"> | ||
{{ card.value.content_type }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we considering to keep these values required in CMS ? I just mean, if no any data then we may have empty HTML tags here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fields are mandatory right now, according to the requirements.
{{ card.value.content_type }} | ||
</div> | ||
<p class="title">{{ card.value.title }}</p> | ||
<p class="content">{{ card.value.content|truncatechars:150 }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we considering to keep these values required in CMS ? I just mean, if no any data then we may have empty HTML tags here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fields are mandatory right now, according to the requirements.
8b6795d
to
cc38d4c
Compare
cc38d4c
to
c87bd72
Compare
c87bd72
to
7a233ef
Compare
7a233ef
to
1c69169
Compare
@asadiqbal08 I have done a small design change of removing icomoon usage in this PR, kindly have a look again to test the changes. |
@briangrossman can you please re-verify the attached design as I have replaced icomoon icons with material design ones, according to this PR #2093 |
@HamzaIbnFarooq Thanks for pointing this out. Those icons look totally fine. |
Pre-Flight checklist
What are the relevant tickets?
#2108
What's this PR do?
Adds a NEWS/EVENTS section to HomePage.
How should this be manually tested?
Screenshots (if appropriate)
Desktop:
Mobile: