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

Refactor @getodk/webform 1/2 #192

Open
7 tasks
sadiqkhoja opened this issue Aug 22, 2024 · 0 comments
Open
7 tasks

Refactor @getodk/webform 1/2 #192

sadiqkhoja opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels

Comments

@sadiqkhoja
Copy link
Contributor

sadiqkhoja commented Aug 22, 2024

From #164 (comment)

  • Consider some DOM-level way of identifying which component rendered what to the DOM
  • Maybe there’s a lint rule (or maybe we could write one trivially?) to ensure consistent use of class/:class? It’s confusing every time I see both used on the same element. (And maybe I’ll get over that seeing it more?)
  • Consider extracting event handlers into functions, especially where their logic is repeated. Case that stood out/made me think about this: several additions of @change="touched = true”.
  • How do we choose between when to apply utility classes, versus using styles that achieve the same? (flex etc stand out)
  • I’m normally not fond of “test helpers”, but have some concern about inconsistent use of mount and globalMountOptions: especially (but not only) whether or not PrimeVue plugin is in use. Worth considering a shared custom mount helper to ensure we’re testing all components under the same assumptions.
  • Adding the same thing in multiple places can be a smell, may suggest there’s a composable component wanting to exist. Case that stood out/made me think about this: several additions of @change="touched = true”.
  • Props naming:
    • “add” is a weird prefix for something that’s not an action/handler/callback. In general, verbs tend to suggest some kind of event handling or interaction -> state reaction.
@sadiqkhoja sadiqkhoja self-assigned this Aug 22, 2024
@sadiqkhoja sadiqkhoja added the UI label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant