-
Notifications
You must be signed in to change notification settings - Fork 5
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
Redesign ticket in the email confirmation and UI changes to boxoffice confirm screen. #158
base: main
Are you sure you want to change the base?
Conversation
vidya-ram
commented
Jun 5, 2017
- Confirmation screen UI changes on Boxoffice widget:
- Ticket redesign on the email confirmation
I suggest changing the copy in the first screenshot to the following format: Almost done!Thank you for your order! You should receive a receipt in your mailbox soon. Meanwhile, care to help us with some more details? We want to make a nice badge for you! The last sentence should ideally be dependent on the number of tickets that the buyer has bought. If it's more than one, it should be 'We want to make nice badges for you'. |
@@ -7,7 +7,7 @@ | |||
|
|||
class TestItemCollectionAPI(unittest.TestCase): | |||
|
|||
expected_keys = ['categories', 'html', 'refund_policy'] | |||
expected_keys = ['categories', 'html', 'eventTitle', 'eventDetails', 'refund_policy'] |
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.
This should probably be in snake_case.
<p class="event-title">{{ item_collection.title }}</p> | ||
<p class="event-date"> | ||
{%- if line_item.item.details.date -%} | ||
<span>{{ line_item.item.details.date }}</span> |
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.
This is a slightly inefficient way to access data via a relationship. Since this doesn't impact user experience it's probably fine, but ideally you might want to fetch all the data you need with a join in the view, and pass the data to the template.
<p class="ticket-input"></p> | ||
{{#if getConfirmedTicket(order.line_items).item_details }} | ||
<p class="ticket-form-label">Venue</p> | ||
<p class="ticket-field-value">{{ getConfirmedTicket(order.line_items).item_details.venue }}</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.
Can we use a computed property instead of a function call?
</div> | ||
|
||
<p><a class="button" href={{"{base_url}/order/{access_token}/ticket".format(base_url=base_url, access_token=order.access_token)}} target="_blank">Edit details</a></p> | ||
<div class="terms-content">{{org.details.get('ticket_faq', '') | safe}}</div> | ||
<div class="terms-content">{{ org.details.get('ticket_faq') | safe }}</div> |
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.
This template has many hardcoded assumptions on the fields in the details
JSON dictionary on various models. These fields need to be reflected in the data model itself, as there is no way to know what fields are expected without reading each line of the templates.
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.
I think this points to a requirement of modeling the event i.e a domain model (say Event
) that comprises of details such as venue
, start_at
, end_at
that shares a many-to-many relationship with Item
(to be renamed to Ticket
). A many-to-many relationship is required to allow for the use case of mapping a combo-ticket to multiple events.
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from coaster import sqlalchemy |
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.
These two import invocations mean different things:
from coaster import sqlalchemy
import coaster.sqlalchemy as sqlalchemy
For the first version to work, coaster's __init__.py
must have an import sqlalchemy
. This is obviously not a good idea. For JsonDict
, always use from coaster.sqlalchemy import JsonDict