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

Redesign ticket in the email confirmation and UI changes to boxoffice confirm screen. #158

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vidya-ram
Copy link
Member

  1. Confirmation screen UI changes on Boxoffice widget:

screen shot 2017-06-05 at 11 28 38 am

  1. Ticket redesign on the email confirmation

screen shot 2017-06-05 at 11 26 47 am

@shreyas-satish
Copy link
Contributor

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']
Copy link
Contributor

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>
Copy link
Contributor

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>
Copy link
Contributor

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>
Copy link
Member

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.

Copy link
Contributor

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
Copy link
Member

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

@CLAassistant
Copy link

CLAassistant commented May 16, 2022

CLA assistant check
All committers have signed the CLA.

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.

4 participants