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

chore: show unsupported error screen for gated content #37

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

saeedbashir
Copy link

This PR address the following Issue

"Learn > Courses > Any audit track course (ex: IBM's The Data Science Method) > Course Home

Tabbing on locked content (such as graded assignments and quiz) in the module doesn't prompt anything"

@rnr
Copy link
Collaborator

rnr commented Jul 24, 2024

@saeedbashir please look on tests

@@ -9,33 +9,37 @@ import SwiftUI
import Core
import Theme

struct UnknownView: View {
public struct UnknownView: View {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe better name is 'NotAvailableOnMobileView' or something like that?

.padding(.top, 12)
StyledButton(CourseLocalization.NotAvaliable.button, action: {
if let url = URL(string: url) {
UIApplication.shared.open(url)
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe check if canOpen url also?

@saeedbashir saeedbashir requested a review from rnr July 24, 2024 12:36
Comment on lines 95 to 97
guard let chapterIndex = chapterIndex else { return }
guard let sequentialIndex else { return }
guard let courseVertical = sequential.childs.first else { return }

Choose a reason for hiding this comment

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

Should we also display any toast error messages to the user in these possible cases?

Copy link
Author

Choose a reason for hiding this comment

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

We will he handing gated content properly post MVP, so we will look into it as well.

Copy link

@shafqat-muneer shafqat-muneer left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@saeedbashir saeedbashir merged commit d4d589e into 2U/develop Jul 25, 2024
3 checks passed
@saeedbashir saeedbashir deleted the saeed/gated_content branch July 25, 2024 10:29
rnr added a commit that referenced this pull request Nov 4, 2024
* chore: show unsupported error screen for gated content (#37)

* chore: string auto-generating

* chore: removed unused func

* chore: update facebook sdk to solve open(url) issue

---------

Co-authored-by: Saeed Bashir <[email protected]>
Co-authored-by: Anton Yarmolenko <[email protected]>
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.

3 participants