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

CampTix: Add an attendee content block with check-in #527

Open
wants to merge 8 commits into
base: production
Choose a base branch
from

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Jun 17, 2020

Add a more obvious way (a block) to show content to only people who have registered for the event, and check them in as "attended" when it's viewed. This also cleans up the conditions for displaying login or content & the validation errors. Lastly, this removes the notices about logging in & the success message, since these are obvious from context and just create noise on the page.

This block can be used on pages to provide Zoom passwords or other "private" content, without relying on attendees saving an email.

Screenshots

In the editor, this wraps the InnerBlocks with some text explaining that the content will be private. IMO this needs the start & end visuals, since it's hard to know if you're in the inner-block container or not, and it would be bad for private content to be accidentally public. But I'd like a designer's eye for a better UI than this :)

attendee-content-editor

On the front-end, it uses the camptix_private UI for everything. If unauthenticated, the form asks for an email. Once logged in, the protected content is displayed.

Screen Shot 2020-06-17 at 12 21 39 PM

Errors verifying info will show above the form.

Screen Shot 2020-06-17 at 2 20 11 PM

How to test the changes in this Pull Request:

  1. Add an "Attendee Content" block to your page
  2. You should only be allowed to add it once, but you can add it to multiple pages
  3. Add any content inside the block
  4. Save the page
  5. View the page, you should see a login form instead of the content
  6. Log in using a valid attendee email — make sure the attendee is not "marked attended" yet
  7. After success, you should see the content, and now the attendee is marked as attended
  8. Reload the page, the content should still be visible

Try creating edge cases by removing or altering the tix_view_token cookie, or tix_view_token meta value, or by changing the attendee to cancelled, or by using different emails, etc.

(Note: tagging as COVID-19 Response since it can help track attendance in online WordCamps)

@ryelle ryelle added this to the COVID-19 Response milestone Jun 17, 2020
@ryelle ryelle requested a review from coreymckrill June 17, 2020 18:34
@ryelle ryelle self-assigned this Jun 17, 2020
@ryelle ryelle changed the title CampTix: Add an attendee content block CampTix: Add an attendee content block with a check-in Jun 17, 2020
@ryelle ryelle changed the title CampTix: Add an attendee content block with a check-in CampTix: Add an attendee content block with check-in Jun 17, 2020
@ryelle ryelle requested a review from iandunn June 17, 2020 20:17
@ryelle ryelle force-pushed the add/camptix-attendee-content branch from 7b97584 to 72c6a71 Compare June 17, 2020 21:02
Copy link
Contributor

@coreymckrill coreymckrill left a comment

Choose a reason for hiding this comment

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

I realize this is still awaiting design, but here are a couple of initial thoughts:

  • 👍 Worked in local testing. Setting a ticket to Refund after the cookie had already been set caused the private content to go back behind the login form. Reinstating the ticket then re-revealed the content without having to log in again.
  • I think it might be worth adding a block setting to toggle whether accessing this particular piece of content automatically marks the person as attended or not. I can see a use case for this block of giving someone access to something before the event and not wanting it to actually mark them as attended.

"html": false,
"multiple": false
}
}
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 probably more relevant for block plugins that are being submitted to the Block Directory, but per the guidelines the block.json file should have at least one of editorScript/script and at least one of editorStyle/style properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left those out since we didn't have access to register_block_type_from_metadata on WC.org yet, but now that we do I think I'll add that in 👍

Copy link
Member

Choose a reason for hiding this comment

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

adding a block setting to toggle whether accessing this particular piece of content automatically marks the person as attended or not. I can see a use case for this block of giving someone access to something before the event and not wanting it to actually mark them as attended.

+1

I think the option should be off-by-default too, since it doesn't seem like a safe assumption to me. That's especially true of in-person events.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, that's what I went with in d1eac20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh wait, what do you mean by "off-by-default"? I think it should default to marking people as attended, since in person events will most likely be the main users of this, for day-of-event content.

Copy link
Member

Choose a reason for hiding this comment

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

The check-in tool would still be the recommended way

I'm not sure I see the point in having this option for in-person events then. Wouldn't they already be checked-in before they access the day-of content?

If so, then this is only relevant for online events, so I think the option should be always-off for in-person events.

we're not tracking any attendance info from online events

That's a great point. I'm fine using "viewed day-of content" as a proxy for "attended an online event", just not in-person events.

Even for online events, though, I still think the button should be off by default. We have no way of knowing if the content inside the block is day-of content or something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand what you're saying, but we're trying to build up the interaction piece for online events too. This isn't for hiding the livestream, so someone who only watches the talks wouldn't be "attended". This is for things like private zooms for hallway tracks, or other ways to interact with other attendees.

I imagine we'll see hybrid events before we move fully back in to in-person events, and even then I think someone who can't attend in-person (whether due to the current issues with covid, or more generally, a disability) but still gets involved should be considered attended.

I think "day of" content will be the majority use case. Even if not, organizers can turn off the check-in feature. And even if they don't, we'll only check-in people if they view it during the event. So I think for the least friction for most organizers, we should keep the default to on, "check in", for all events.

Copy link
Member

Choose a reason for hiding this comment

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

Are you saying that it would only mark someone as attended if both of the following are true?

  • it's an online event
  • the person views the content while the event is happening

If so, then that's good enough for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default, we'll mark people attended only during the event, for any kind of event.

The organizer has the option to turn this off per-block, if they're adding content where that doesn't make sense.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I know there's an option to turn it off, but I don't think that's enough to keep the stats accurate. Most people will just go with whatever the default is, rather than paying close attention and considering the implications.

Although, that also means that if it were off by default, then there'd be lots of cases where the organizer should enable it, but doesn't, which would lead to inaccuracy in the other direction.

So maybe it'd make sense to set the default it to on for online events, but off for in-person events? That would reflect the correct setting in the majority of situations, and the organizer can still flip it if they want.

@ryelle ryelle force-pushed the add/camptix-attendee-content branch from 72c6a71 to ebb16bd Compare June 30, 2020 19:33
This defaults to true, so the block will set people attended by default — but if the organizers want to share private content before the event, they can toggle this off.
@ryelle
Copy link
Contributor Author

ryelle commented Jun 30, 2020

adding a block setting to toggle whether accessing this particular piece of content automatically marks the person as attended or not

Good idea— I added that in d1eac20 — it defaults to on, but if it's turned off, attendees are not marked "attended".

Screen Shot 2020-06-30 at 3 52 51 PM

@paaljoachim
Copy link

paaljoachim commented Jun 30, 2020

Thanks for the heads up in regards to this issue, Kelly! I noticed you mentioned the issue in the design slack channel.

Here is an example of where we need a conditional logic block. Something happens and if true do something. Could be show/hide blocks. In this case read a list of e-mail addresses from a list and if the users who has logged in has their e-mail address on the list then do something like show a group block with image, text and a zoom link. If they do not have their e-mail address on the list then show something else.

Instead of creating a very specific attendee conditional logic block what about creating a more general conditional block or perhaps there is already one out there that can be modified and used. Here is an older Conditional Blocks issue: WordPress/gutenberg#6866 (There are also some mentions of Conditional block plugins.)

Bottom line is if we get a conditional block into Gutenberg then this could also be extended for other uses later on.

@mapk
Copy link

mapk commented Jul 9, 2020

Hey @ryelle, I've been thinking this through a bit. I'm not sure how to test this (where do I find the "Attendee Content" block?). But I worked through a flow that I thought might help.

I imagined the block working similarly to the Group block. It's basically a container, but it displays a login form on the frontend (unlike the Group block). Once the user logs in (on the frontend), they can see the contents of the block. Is that correct?

Assumptions:

  1. The user wouldn't see the login form in the Editor. Rather, it would mimic the Group block behavior.
  2. BUT when content is added, this block retains a dashed outline at all times indicating something special about this block's content. A dashed outline felt natural as a way to convey hidden content.
  3. The block description would talk about how this blocks works?

Anyways, here's a go at it. Let me know if I'm way off. 😄

attendee-content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] CampTix Including addons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants