we are starting the account center and direct sign-in elements projects, which requires us to deliver a set of ui elements for our developers. per our strategy, these elements should cover the major frameworks, or be framework-agnostic.
so Web Components is definitely a choice. besides, we can use these elements in the Logto Cloud's account center to always be the first user of these elements (i.e. eat your own dog food).
Tech choices and rationale
Web Components: lit. lit uses decorators but it's the most popular existing Web Components library. stencil is also cool but is has a memory leak issue since 2022. apparently the company has no enough resource on this project.
bundling: tsup. near-zero config, very neat and simple. nothing to complain so far.
About this pull
init the basic setup of @logto/elements, and introduce this package to @logto/console. since this pull is already large, several things to-do in separate pulls:
show i18n result in components (now they are just keys) #6250
replace current console account page with elements
figure out online documentation for elements
consider a better approach for react component exports
try to resolve the duplicate component registration issue in dev (hot reload)
Summary
introduce the
@logto/elements
packageBackground
we are starting the account center and direct sign-in elements projects, which requires us to deliver a set of ui elements for our developers. per our strategy, these elements should cover the major frameworks, or be framework-agnostic.
so Web Components is definitely a choice. besides, we can use these elements in the Logto Cloud's account center to always be the first user of these elements (i.e. eat your own dog food).
Tech choices and rationale
About this pull
init the basic setup of
@logto/elements
, and introduce this package to@logto/console
. since this pull is already large, several things to-do in separate pulls:Testing
Checklist
.changeset