-
Notifications
You must be signed in to change notification settings - Fork 2
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
Form refactorings and fixes #87
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csillag
force-pushed
the
csillag/form-enhancements
branch
from
October 12, 2024 04:45
66c3fee
to
b4b72c6
Compare
Field library: - Rename (redefine) them as field messages, instead of problems. - Support markdown for the content - Add a new "info" message type (besides the existing "warning" and "error"). - "info" messages won't disappear on clicking, unlike warnings and errors. Blockvote app: - Re-implement xchain contract and balance info display as info messages from the validator, as opposed to independent fields.
- Forward onMouseEnter onMouseLeave, onFocus to underlying component (for tooltip) - Implement disabling differently: instead of using the native "disabled" prop, we are swallowing the click on the click handler. This is necessary because a really disabled html button won't react to mouse hover events. - Use more specific CSS class names on label, to avoid ambiguity
- More HTML rendering from the React component to the hook - Apply markdown renderer by default - Allow specifying the HTML tag to use
- only drop empty items if we have enough remaining items - properly indicate disabled state
- Turn the title and the intro into form elements - Turn the prev, next, create buttons into form elements - Remove all custom "pending" logic
- Don't validate hidden fields - In form controls, also pass cleanValue - Cleanup: validate() returning "true" means "hasErrors" - ArrayList: - execute the dropEmptyItems action after validation, independently of value cleanup. - If there are only empty values, consider the whole value empty, and don't validate - Field group validation: - ignore visibility (it is handle internally in each field's validation) - sort out boolean semantics and logics
- Validation pending status message can now be MarkDown - Adapt pending action status output to validation UI
Disable form fields and prev button
csillag
force-pushed
the
csillag/form-enhancements
branch
from
October 24, 2024 11:06
6b80c56
to
3c3a5d7
Compare
- Rename clearMessage to clearErrorMessages, to make it more apparent that this method won't remove info messages. - Input field messages: improve message handling Now we can call addMessage() multiple times within the same render. - useAction: - CSS: Adjust how input field rows are aligned.
- Define ExecutionContext, and use it consistently for all process status update stuff on all layers. - Add debug output about the results of ActionButtons - Alignment adjustments - Support confirmQuestion for actions
Reimplement various parts of poll pages as actions and labels, logic powered by the standard form logic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.