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

Gracefully handle invalid modes #1034

Merged
merged 2 commits into from May 31, 2019
Merged

Conversation

acdha
Copy link
Member

@acdha acdha commented May 31, 2019

This gracefully handles typos like https://crowd.loc.gov/act/#mode=review?loclr=twcwd which caused the first asset load to fail because it's given a mode which could not normally occur.

@acdha acdha requested a review from rstorey May 31, 2019 18:36
@acdha acdha self-assigned this May 31, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.258% when pulling 9466bca on activity-ui-invalid-mode-fallback into cbe0893 on master.

@rstorey
Copy link
Member

rstorey commented May 31, 2019

Should we not check if the mode value contains transcribe or review, rather than checking for exact matches? That way we could still load the requested mode even with the incorrect URL.

@acdha
Copy link
Member Author

acdha commented May 31, 2019

My feeling was that it was better just to fallback to review mode than to attempt to salvage it but since we're talking n=2 here we could do something like mode.contains("transcribe") in an attempt to work both ways.

@rstorey
Copy link
Member

rstorey commented May 31, 2019

Works for me

@rstorey rstorey merged commit 9789525 into master May 31, 2019
@rstorey rstorey deleted the activity-ui-invalid-mode-fallback branch June 5, 2019 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants