Repository navigation
fix: tidy form dialogs, stop double submits and fix reported LMS bugs (backport #3256) - #3327
Merged
raizasafeel merged 19 commits intoNov 17, 2026
Merged
Conversation
(cherry picked from commit d791cea)
(cherry picked from commit 4dbf303) # Conflicts: # frontend/src/pages/Programs/ProgramEnrollment.vue
(cherry picked from commit eefb240) # Conflicts: # frontend/src/pages/Batches/Batches.vue
(cherry picked from commit 86b9cd4)
(cherry picked from commit 0ed4a5f)
(cherry picked from commit e1e0766) # Conflicts: # frontend/src/components/Sidebar/AppSidebar.vue # frontend/src/pages/Lesson.vue
(cherry picked from commit 79d8afb)
(cherry picked from commit 3af1408)
(cherry picked from commit c612645) # Conflicts: # frontend/src/components/Layouts/settings/desktop/SettingsFieldsPanel.vue # frontend/src/components/Profile/ChangePasswordDialog.vue # frontend/src/components/Settings/Categories.vue # frontend/src/components/Settings/EmailAccount/EmailAccountDefaults.vue # frontend/src/components/Settings/GoogleCalendar/GoogleCalendarDetail.vue # frontend/src/components/Settings/Members/members.ts # frontend/src/components/Settings/Services/Services.vue # frontend/src/pages/Setup.vue # frontend/src/tests/emailAccountDefaultsPanel.test.ts
(cherry picked from commit 1d9cbf1)
(cherry picked from commit fd08804)
(cherry picked from commit ffe35ba) # Conflicts: # frontend/src/tests/CourseOverviewOutline.test.ts # frontend/src/tests/FormShell.test.ts # frontend/src/tests/LessonHelp.test.ts # frontend/src/tests/UploadPlugin.test.ts # frontend/src/tests/a11y-keyboard.test.ts # frontend/src/tests/a11y-media.test.ts # frontend/src/tests/announcementForm.test.ts # frontend/src/tests/assignmentCard.test.ts # frontend/src/tests/assignmentForm.test.ts # frontend/src/tests/assignmentStudentView.test.ts # frontend/src/tests/assignmentsCount.test.ts # frontend/src/tests/badgeForm.test.ts # frontend/src/tests/batchStudentForm.test.ts # frontend/src/tests/bulkCertificatesForm.test.ts # frontend/src/tests/chapterForm.test.ts # frontend/src/tests/chapterTitleAutofocus.test.ts # frontend/src/tests/commandPalette.test.ts # frontend/src/tests/courseDetailOutlet.test.ts # frontend/src/tests/courseEnrollmentForm.test.ts # frontend/src/tests/courseImportForm.test.ts # frontend/src/tests/coursePublishSettings.test.ts # frontend/src/tests/emailAccountForm.test.ts # frontend/src/tests/emailTemplateForm.test.ts # frontend/src/tests/embeddedExerciseSubmission.test.ts # frontend/src/tests/jobApplicationsWithoutEmails.test.ts # frontend/src/tests/jobDetailLogo.test.ts # frontend/src/tests/lessonInlineMenu.test.ts # frontend/src/tests/lessonLocking.test.ts # frontend/src/tests/listHeaderButtons.test.ts # frontend/src/tests/liveClassForm.test.ts # frontend/src/tests/memberFormRoute.test.ts # frontend/src/tests/mobileBottomBar.test.ts # frontend/src/tests/newBatchForm.test.ts # frontend/src/tests/newCourseForm.test.ts # frontend/src/tests/programForm.test.ts # frontend/src/tests/questionEditorSizing.test.ts # frontend/src/tests/ravenSettings.test.ts # frontend/src/tests/resourceCacheRemount.test.ts # frontend/src/tests/responsiveListView.test.ts # frontend/src/tests/routeTables.test.ts # frontend/src/tests/searchFilterDoubleFetch.test.ts # frontend/src/tests/settingsDialogWidth.test.ts # frontend/src/tests/settingsList.test.ts # frontend/src/tests/settingsListSearch.test.ts # frontend/src/tests/settingsTableScroll.test.ts # frontend/src/tests/submissionsPage.test.ts # frontend/src/tests/switchRow.test.ts # frontend/src/tests/tabbedDetailPage.test.ts # frontend/src/tests/upcomingEvaluationsNotice.test.ts # frontend/src/tests/uploadFailureToast.test.ts # frontend/src/tests/userAvatarIndicator.test.ts # frontend/src/tests/userDropdownTheme.test.ts
(cherry picked from commit b016c71)
(cherry picked from commit b6ee6cf)
…spinner (cherry picked from commit 3a1f127) # Conflicts: # frontend/src/components/Modals/VideoStatistics.vue # frontend/src/tests/courseImportForm.test.ts # frontend/src/tests/liveClassForm.test.ts # frontend/src/tests/memberFormRoute.test.ts
…nt enrolls A batch with no students has nobody to announce to or certify, so Make Announcement and Generate Certificates stay hidden until someone is enrolled. The Announcements tab instead explains that and offers Enroll Students, which opens the enroll form on the Dashboard tab where students are listed. (cherry picked from commit 2076c53) # Conflicts: # frontend/src/pages/Batches/components/Announcements.vue
The preview video label now shares a row with its info button, so the label's parent no longer holds the input and the old lookup timed out. (cherry picked from commit c7edd17)
get_website_settings keeps a copy on frappe.local for the whole process. On a fresh site sign-up starts disabled, so a test run that read the settings earlier left the sign-up tests seeing it disabled even after they turned it on. (cherry picked from commit f288882)
Author
|
Cherry-pick of 4dbf303 has failed: Cherry-pick of eefb240 has failed: Cherry-pick of e1e0766 has failed: Cherry-pick of c612645 has failed: Cherry-pick of ffe35ba has failed: Cherry-pick of 3a1f127 has failed: Cherry-pick of 2076c53 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On large batches, staff saw an error when sending an announcement even though it went out, so they sent it again and students got it twice. A double click on Post published a discussion reply twice. Learners couldn't find the batch they were in, because the batch list opened on Upcoming, which hides batches that have started. Visitors had to open the logo menu to find Log in. Edit Program showed empty member rows. This PR fixes all of these. It makes every action button show loading and ignore repeat clicks, and replaces a repeated toast instead of stacking copies.
Intent
This is for Frappe Learning admins, instructors and learners. It finishes the dialog clean-up started in #3255 and fixes bugs reported by a large customer: double sends and posts, a hard-to-find batch, a hard-to-find Log in, and blank member rows in Edit Program. It also stops action buttons from running twice and toasts from stacking. Finally, it removes mocked frontend tests that only checked layout or stub wiring. Backporting the quiz-insert fix (#2853) and the upstream frappe permission bug behind the blank member rows are left out on purpose.
Evidence
Before shots are from
develop(with #3255), after shots from this branch.1. A refusal is a toast, and loading is one centered spinner · live
The batch menu on a batch with certificates on and no students, typing the Generate Certificates link (
/batches/<batch>/certificates) by hand for a batch without certificates, and New Announcement while the batch loads. The menu item now only shows on batches with certificates and students, so a hand-typed link is the only way to reach the refusal:The same spinner is the default in Student Progress, Live Class Attendance, Video Statistics, Schedule Evaluation and Course Progress. A form can pass a skeleton in FormShell's
loadingslot instead.2. Five clicks on Post with an empty reply show one toast · live
3. A double-clicked reply posts once, an announcement queues once, and Edit Program shows members · live
A double click on Post took the reply count from 0 to 2 before and from 0 to 1 after.
Communications is 0 because no background worker ran in this dev setup. The test job was removed afterwards.
4. Learners open on Enrolled, and visitors get a Log in card · live
Clicking Log in went to
/login?redirect-to=%2Flms%2Fcourses%3Fcategory%3Ddesign.5. A batch with no students shows an enroll step, not Make Announcement · live
After, no Make Announcement button was on the page at either width, and Enroll Students went to
/lms/batches/test-batch-10/student/new#dashboard(before:#announcements). A batch with students still shows Make Announcement.Review
✅ Approve · 0 blockers · 0 issues · 0 nits, reviewed 3222540; the refusal-toast-and-spinner and no-students commits sit on top, checked live and by the full test suite but not by a review round; commits regrouped one per fix and rebased onto develop 651512a
Tidy commits (no behaviour change):
Each fix's follow-up refactors are folded into its own commit, so the history is one commit per fix.
Test fixes (tests only; neither test is otherwise changed by this branch):
frappe.localmadetest_a_new_address_creates_the_userfail depending on test order.Local runs on f288882, all green: Vitest 2357/2357, server tests 2180 (
run-tests --app lmson a fresh frappe + payments + lms site, 3 skipped), Playwright 12/12 on a fresh site set up like CI.Decisions:
Follow-ups:
validate_fields) upstream./loginlinks without a return page (NoPermission, AssessmentBlock, QuizBlock, router, and others) should move toredirectToLogin().useAutosavefor "save during create".Declined to judge:
statusClassprop name./loginlinks above, which predate this change.Merge Danger
Door: two-way. Every change is in code; there are no schema changes or patches. Reverting restores the old behaviour.
Blast radius: wide. About 80 frontend files change: form dialogs, action buttons and toasts across courses, batches, programs, settings and profiles. Batch announcements now need a background worker on the long queue to actually send.
This is an automatic backport of pull request #3256 done by [Mergify](https://mergify.com).