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

Added class option for labels to appear above their field #96

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

aletail
Copy link
Member

@aletail aletail commented Oct 30, 2024

https://werkbotstudios.teamwork.com/app/tasks/36275863

Summary

Added class option for labels to appear above their field

Testing Steps

  • Test xmc (This worked for me: "werkbot-framewerk": "github:werkbot/framewerk#feature/label-above")
  • Run npm update/build
  • Add fw-form-label-above class to forms (UserFormExtension in xmc)
  • Create a userform (or can use existing)
  • Confirm labels appear above their respective fields
  • Confirm the animations on focus do not show

Issues/Concerns

  • I had some issues with vite not showing the updates after a npm update/build/copy - curious if you have any problems

Git Flow

  • DO NOT delete "release/*" or "hotfix/*" branches after merging a PR. These are used to publish the next release, and they are deleted automatically.
  • "Squash and merge" is good on "feature/*" into "develop"
  • "Create a merge commit" is good on "release/*" or "hotfix/*" into "main"
  • With npm repositories, the version number must be incremented manually, before merging the release.

@aletail aletail requested a review from tiller1010 October 30, 2024 15:55
@aletail aletail added the patch label Oct 30, 2024
Copy link
Member

@tiller1010 tiller1010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it should be tagged as minor instead of patch since it adds new functionality.

I had some issues with vite not showing the updates after a npm update/build/copy

It could be that you have to run the yarn container first, if you have the vite container running.

docs/en/form.md Outdated
@@ -100,3 +100,6 @@ $component-form-text-with-button-properties: (
## Form Process Animation
When a form is submitted all fields are disabled including the submit button. An animated icon is added next to the submit button as well.
You must opt-in for this to take effect, the form element must contain the following class: `fw-form-process-event` as well as the `fw-form` class.

## Label placements
By default, labels are placed inside the input box. To change this, simply add the `fw-form-label-above` class alongside the `fw-form class`. This adjustment moves labels above the fields, eliminating any animation when a field gains or loses focus.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backtick on the fw-form includes "class", so it appears as "fw-form class" instead of "fw-form class".

transform: none;
}
}
textarea{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an input selector.

@aletail aletail added minor and removed patch labels Oct 31, 2024
@aletail aletail requested a review from tiller1010 October 31, 2024 14:28
Copy link
Member

@tiller1010 tiller1010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@aletail aletail merged commit 7741861 into develop Oct 31, 2024
@aletail aletail deleted the feature/label-above branch October 31, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants