Skip to content

[login] Update login-overlay to native popover and render title, form etc in slots #9699

@web-padawan

Description

@web-padawan

Motivation

Depends on #9694

Currently, vaadin-login-overlay renders vaadin-login-form as a child of the overlay wrapper which then gets teleported to the body. Also it has custom logic for teleporting title, custom-form-area and footer slots. This is problematic, see vaadin/react-components#269.

Proposed solution

  1. Update vaadin-login-overlay-wrapper to use native popover instead of teleporting to <body>
  2. Update vaadin-login-overlay to not use vaadin-login-form but use vaadin-login-form-wrapper
  3. Forward title slot to the overlay wrapper and form, submit etc to the form wrapper, respectively
  4. Use LoginFormMixin in the vaadin-login-overlay to initialize slotted form and buttons with controllers
  5. Create a separate controller to handle slotted title and remove fallback element with part="title"
  6. Set exportparts attribute on both login overlay wrapper and form wrapper to enable ::part() styling
  7. Rename overlay-wrapper form part to e.g. form-container to avoid form-wrapper part name conflict

Prototype: https://github.com/vaadin/web-components/compare/proto/native-popover-login

Additional context

This will require updating TestBench element since LoginOverlay will no longer have LoginForm.
The getLoginForm() method be removed, and getUsernameField() etc will be reimplemented.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions