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

fix: loading of session form in wizard step 5 #5843

Merged
merged 11 commits into from
Dec 2, 2020
Merged

fix: loading of session form in wizard step 5 #5843

merged 11 commits into from
Dec 2, 2020

Conversation

maze-runnar
Copy link
Contributor

Fixes #5768

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Dec 1, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/md4coig2e
✅ Preview: https://open-event-frontend-git-loading.eventyay.now.sh

@codecov
Copy link

codecov bot commented Dec 1, 2020

Codecov Report

Merging #5843 (cb146a4) into development (a33523e) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5843      +/-   ##
===============================================
- Coverage        23.46%   23.42%   -0.04%     
===============================================
  Files              512      512              
  Lines             5460     5469       +9     
  Branches            63       65       +2     
===============================================
  Hits              1281     1281              
- Misses            4163     4171       +8     
- Partials            16       17       +1     
Impacted Files Coverage Δ
app/routes/events/view/edit/sessions-speakers.js 0.00% <0.00%> (ø)
app/routes/public/index.js 0.00% <0.00%> (ø)
app/components/widgets/forms/link-field.ts 60.00% <0.00%> (-5.22%) ⬇️
app/mixins/event-wizard.js 0.89% <0.00%> (ø)
app/components/forms/orders/order-form.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a33523e...8ad15bd. Read the comment docs.

data.event
.get('speakersCall')
.then(relationshipRecord => {
resolve(relationshipRecord);
Copy link
Member

Choose a reason for hiding this comment

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

This then call is redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after removing then, the session page isn't loading

@@ -14,7 +14,19 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin
const tracksPromise = data.event.get('tracks');
const microlocationsPromise = data.event.get('microlocations');
const sessionTypesPromise = data.event.get('sessionTypes');
const speakersCallPromise = this.getOrCreate(data.event, 'speakersCall', 'speakers-call');
const speakersCallPromise = new RSVP.Promise(resolve => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you please move this to an async function, and use await in that function?

@@ -14,7 +14,19 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin
const tracksPromise = data.event.get('tracks');
const microlocationsPromise = data.event.get('microlocations');
const sessionTypesPromise = data.event.get('sessionTypes');
const speakersCallPromise = this.getOrCreate(data.event, 'speakersCall', 'speakers-call');
const speakersCallPromise = new RSVP.Promise(async resolve => {
await data.event
Copy link
Member

Choose a reason for hiding this comment

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

Don't await here, it's useless and will block the loading. Move these statements in another function and await in that function. No await should be there in model function

@lgtm-com
Copy link

lgtm-com bot commented Dec 2, 2020

This pull request introduces 1 alert when merging 8da2dab into f17e24c - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@mariobehling mariobehling changed the title fix: loading of session form in wizars step 5 fix: loading of session form in wizard step 5 Dec 2, 2020
@mariobehling
Copy link
Member

Working for me, but the issue did not appear all the time, just from time to time. We need to test this a while. So, I think this can be merged then.

@iamareebjamal iamareebjamal merged commit 9d41e9e into fossasia:development Dec 2, 2020
@maze-runnar maze-runnar deleted the loading branch December 2, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wizard Step 5: Page often does not load forms below top area
3 participants