Skip to content

refactor(events): drop link auto-suggest and keep http links as typed - #525

Merged
harshtandiya merged 1 commit into
developfrom
refactor/event-links-cleanup
Oct 3, 2026
Merged

harshtandiya merged 1 commit into
developfrom
refactor/event-links-cleanup

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

What changed

Follow-up cleanup on event links from #524.

  • Removed the URL-based auto-suggest (11-regex table guessing label + icon). New links start on the generic link icon; organisers name them. Drops the URL watcher and the label/icon tracking state in the dialog.
  • Editing an existing http:// link no longer saves it back as https://. WebsiteInput strips the scheme, so the dialog now remembers the original one.
  • Server URL check names the row (Row 2: link must start with…) instead of the label. validate runs before Frappe's mandatory check, so a missing label rendered as "Link None".
  • fill() copies links with a spread instead of re-listing the three fields.

Not changed: submitOnEnter stays. The form has two inputs and no submit button, so Enter won't submit natively, and a submit-type Button fires twice (see AddCoHostDialog).

Demo

skip-demo: dialog looks the same; only the auto-filled label and icon are gone.

Testing

  • bench run-tests --module buzz.api.events.test_events: 98 OK
  • node --test src/utils/eventLinks.test.ts: 4 pass
  • vue-tsc clean for src/, pre-commit clean
  • e2e manage-event.spec.ts links tests updated to type the label and pick the icon; left to CI

The link dialog no longer guesses a label and icon from the URL; new links
start on the generic link icon and organisers name them. Editing an existing
http:// link saves it back as http:// instead of upgrading it to https://.

The server-side URL check names the row instead of its label, since validate
runs before the mandatory check and the label may still be empty.
@harshtandiya harshtandiya added the skip-demo Skip adding a video / screenshot in PR description. Passes the failing CI for demo addition label Oct 3, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@harshtandiya
harshtandiya merged commit 265bd4c into develop Oct 3, 2026
9 of 10 checks passed
@harshtandiya
harshtandiya deleted the refactor/event-links-cleanup branch October 3, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-demo Skip adding a video / screenshot in PR description. Passes the failing CI for demo addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant