-
Notifications
You must be signed in to change notification settings - Fork 18
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
Pre-campaigns API+UI changes #37
base: main
Are you sure you want to change the base?
Conversation
The classes were not working for me when I tried to click around the UI but after removing the duplicate Other than that LGTM! I appreciate the use of stores, that's definitely a right way, I had no time to implement it so thank you! |
@@ -113,61 +44,46 @@ | |||
{#if visible} | |||
<div transition:slide={{ axis: 'x' }} class="sidebar pt-5 flex-shrink-0"> | |||
<button type="button" class="btn-close close-btn" on:click={() => (visible = false)}></button> | |||
{#if challenges === undefined || classes === undefined} | |||
{#if !($challenges.length && $classes.length)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In here I think it's better to check for the undefined value. Happened already couple times that some challenges/classes broke the DB initialisation and so later the API then returned empty set of classes and challenges. In this case the UI would keep showing "loading" eventhough the loading was done, right? But of course that ideally should not happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is right - I'm changing the initial value to an explicit null
and then checking for coercion to false rather than explicit equality with undefined
, though
<ClassDetail /> | ||
<ClassDetail curClass={$chosenClass} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a duplicate line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, the result of artificially splitting this into multiple commits >:)
2a0a178
to
95174b0
Compare
Description
(commit hashes now out of date because of rebase)
alert
for server errorsCollapsibleSection
)chosenClass
andchosenChallenge
onApp
level, we now usewindow.location.hash
-powered navigation, which:CollapsibleSection
using localStorageType of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
run_tests.sh
Checklist:
eslint
and formatted it properly usingprettier
pylint
and formatted it properly usingautopep8