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

Make all input components consistent (in terms of events, parameters, etc) #183

Open
Aran-Fey opened this issue Nov 30, 2024 · 0 comments
Open
Labels
enhancement Improves on existing functionality - NOT a new feature

Comments

@Aran-Fey
Copy link
Contributor

In terms of interface:

  • Focus events: on_gain_focus, on_lose_focus
  • Change event: on_change
  • Confirm event: on_confirm

There are also some design decisions we should think about:

  • Should each component get its own events? Do we really need a TextInputFocusEvent and a MultiLineTextInputFocusEvent and a NumberInputFocusEvent and ...?
  • Should there be a base class (in JS and/or in python) that implements this interface?

In terms of optimization, we should also avoid sending unnecessary messages between the backend and the frontend. Most TextInputs don't have a on_gain_focus or on_lose_focus event handler, and yet the backend notifies the frontend every time one of these events occurs.

@Aran-Fey Aran-Fey added the enhancement Improves on existing functionality - NOT a new feature label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves on existing functionality - NOT a new feature
Projects
None yet
Development

No branches or pull requests

1 participant