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

Add workshop box for teachers with RPs that don't offer CSA #45137

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

megcrenshaw
Copy link
Contributor

@megcrenshaw megcrenshaw commented Mar 3, 2022

Currently, if CSA workshops are available in their region, teachers will see this
image

If CSA workshops are not available in their region, teachers see this
image

With the new functionality, teachers see this if there are no CSA workshops (screenshot of local environment––I didn't set RP information for appsPriorityDeadlineDate so no call to action):
Screen Shot 2022-03-02 at 4 10 53 PM

And nothing changes if there are CSA workshops (screenshot of local environment––I didn't set RP information for appsPriorityDeadlineDate so no call to action):
Screen Shot 2022-03-02 at 4 14 37 PM

Links

Testing story

Deployment strategy

Follow-up work

I created a follow-up ticket for test coverage: https://codedotorg.atlassian.net/browse/PLAT-1650.

Description:
The RegionalPartnerSearch has 0 test coverage. Right now, trying to add test coverage results in errors about how we are setting state in the component:

Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to this.statedirectly or define astate = {};class property with the desired state in the %s component.

We should probably refactor this component to use hooks, which would allow us to avoid mounting the component to test it.

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@megcrenshaw megcrenshaw requested review from tim-dot-org and a team March 3, 2022 13:46
workshops:
partnerInfo &&
partnerInfo.summer_workshops.filter(
workshop => workshop.course === 'CS Discoveries'
workshop => workshop.course === `${ActiveCourseWorkshops.CSD}`
Copy link
Contributor

Choose a reason for hiding this comment

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

tiny nit: these are already strings, so they don't need to be wrapped

Copy link
Contributor

Choose a reason for hiding this comment

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

otherwise, looks great!

@@ -303,9 +304,32 @@ class RegionalPartnerSearch extends Component {
collection => collection.workshops.length === 0
) && <div>Workshop details coming soon!</div>}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a weird quirk, if there are no workshops at all, it'll show this text and also the CSA text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strong point––I'll check with Tess what we want to do in that situation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

She says it's not a huge deal since this won't happen next year, but I'll add something for it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just tweaked it––new screenshots for workshops, and then if there are no workshops
Screen Shot 2022-03-04 at 2 21 53 PM
Screen Shot 2022-03-04 at 2 22 46 PM

Copy link
Contributor

@tim-dot-org tim-dot-org left a comment

Choose a reason for hiding this comment

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

perfect!

@megcrenshaw megcrenshaw merged commit fc6253d into staging Mar 7, 2022
@megcrenshaw megcrenshaw deleted the workshop-box branch March 7, 2022 12:10
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.

None yet

2 participants