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

Textarea props #305

Closed
wants to merge 4 commits into from
Closed

Textarea props #305

wants to merge 4 commits into from

Conversation

ogzcode
Copy link
Contributor

@ogzcode ogzcode commented Jul 24, 2024

#268

Added feat for above issue ☝️

  1. Added maxLength and minLength props for textarea component.It was not working in its current form.
  2. Textarea documentation updated according to new props
  3. Added special cursor style for disabled state for textarea component.There was no deterministic style for the disabled state.

Please check and approve this PR. I will be waiting for your feedback

@Sqrcz @cogor @zoltanszogyenyi @robert1508

Summary by CodeRabbit

  • New Features

    • Introduced a new <fwb-textarea> component for improved message input with validation for character limits.
    • Added conditional rendering for labels in the file input component, enhancing usability and accessibility.
  • Enhancements

    • Improved visual feedback for disabled textarea elements with new styles indicating their state.
    • Updated attribute naming conventions for better readability and consistency.
  • User Interface Changes

    • Modified layout of the file input component for a more user-friendly presentation.

Copy link

coderabbitai bot commented Jul 24, 2024

Walkthrough

The recent updates enhance the user interface for input components in a Vue.js application, introducing a new <fwb-textarea> with specific constraints for user messages. Adjustments to layout and functionality in the file input component improve usability and accessibility. The styling and behavior of textarea elements have also been refined, ensuring a better visual indication of their state. Overall, these changes promote a more structured and user-friendly experience across the input elements.

Changes

File Change Summary
docs/components/textarea.md Introduced <fwb-textarea> with v-model, new props for length constraints, improving user input handling.
docs/components/textarea/examples/FwbTextareaExampleDisabled.vue Changed attribute names to min-length and max-length for consistency and readability.
src/components/FwbFileInput/FwbFileInput.vue Altered layout to vertical alignment, added conditional label rendering for improved usability.
src/components/FwbTextarea/composables/useTextareaClasses.ts Enhanced classes for disabled state, improving visual feedback and accessibility.

Poem

🐰 In a garden of text, where messages bloom,
A textarea now whispers, dispelling the gloom.
With limits set gently, each word finds its place,
User-friendly changes, bringing smiles to the space.
Hop along, dear friends, let your thoughts take flight,
In this cozy new home, where input feels right! 🌼✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for sensational-seahorse-8635f8 ready!

Name Link
🔨 Latest commit 5f550be
🔍 Latest deploy log https://app.netlify.com/sites/sensational-seahorse-8635f8/deploys/66a0f0f3c57189000865df0d
😎 Deploy Preview https://deploy-preview-305--sensational-seahorse-8635f8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ogzcode ogzcode changed the title Textarea attribute Textarea props Jul 24, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a0f04ed and 5f550be.

Files selected for processing (5)
  • docs/components/textarea.md (1 hunks)
  • docs/components/textarea/examples/FwbTextareaExampleDisabled.vue (1 hunks)
  • src/components/FwbFileInput/FwbFileInput.vue (1 hunks)
  • src/components/FwbTextarea/FwbTextarea.vue (3 hunks)
  • src/components/FwbTextarea/composables/useTextareaClasses.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/components/textarea/examples/FwbTextareaExampleDisabled.vue
Additional comments not posted (6)
src/components/FwbTextarea/composables/useTextareaClasses.ts (1)

5-5: LGTM!

The addition of disabled:cursor-not-allowed and disabled:opacity-50 enhances the visual feedback for disabled textarea elements, improving accessibility and user experience.

src/components/FwbTextarea/FwbTextarea.vue (2)

11-12: LGTM!

The maxLength and minLength props are correctly integrated and bound to the textarea element, improving input validation and user experience.


34-35: LGTM!

The maxLength and minLength props are correctly added to the TextareaProps interface with appropriate default values, enhancing the component's flexibility and usability.

Also applies to: 48-49

src/components/FwbFileInput/FwbFileInput.vue (2)

18-18: LGTM!

The change from "flex items-center justify-center" to "flex flex-col items-start justify-center" improves the layout by shifting from a horizontal to a vertical alignment of child elements.


23-23: LGTM!

The addition of a <span> element to display the label if the label property is not an empty string enhances the component's usability by providing context to the user.

docs/components/textarea.md (1)

105-111: LGTM! Verify the correct implementation of max-length and min-length props.

The addition of max-length and min-length props enhances the functionality by allowing developers to set character limits. Ensure that these props are correctly implemented in the fwb-textarea component.

@ogzcode ogzcode closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant