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

Feat Implementation for issue#1017 #1027

Merged
merged 16 commits into from
Jul 16, 2024

Conversation

utin-francis-peter
Copy link
Contributor

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  1. Prompts input migration from div contentEditable to a more accessible TextArea custom component
  2. custom Input component with default tw classes to make the inputs across frontend DRY

Copy link

vercel bot commented Jul 3, 2024

@utin-francis-peter is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@utin-francis-peter utin-francis-peter changed the title Feat/issue#1017 Feat Implementation for issue#1017 Jul 3, 2024
Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 1:35pm

@siiddhantt
Copy link
Collaborator

hi @utin-francis-peter
The PR looks good, just a few comments.

@utin-francis-peter
Copy link
Contributor Author

Thanks for the review, @siiddhantt.

Based on the current design, hasSilverBorder prop encapsulates border-silver dark:border-silver/40 styles. There's also a border-jet border-b-2 and border-gray-5000 dark:text-silver that isn't accounted for yet with props as they're not used in multiple locations yet.

Considering these, what options do you propose for the variant prop? Also, would you advise a camelCase or ALLCAPS style be used for the options so they act as an enum?

@siiddhantt
Copy link
Collaborator

Considering these, what options do you propose for the variant prop?

@utin-francis-peter would something like variant?: 'silver' | 'jet' | 'gray'; be good just for the border color? Something like that maybe.

@utin-francis-peter
Copy link
Contributor Author

Considering these, what options do you propose for the variant prop?

@utin-francis-peter would something like variant?: 'silver' | 'jet' | 'gray'; be good just for the border color? Something like that maybe.

It does sound cool.

Perhaps the prop could be colorVariant instead?

Copy link

codecov bot commented Jul 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.83%. Comparing base (5aa8871) to head (d554444).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1027   +/-   ##
=======================================
  Coverage   21.83%   21.83%           
=======================================
  Files          80       80           
  Lines        3645     3645           
=======================================
  Hits          796      796           
  Misses       2849     2849           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dartpain
Copy link
Contributor

dartpain commented Jul 7, 2024

One note before merging, is lets not create a component for input box from conversation.tsx for a few reasons:

  1. Its better to create separate component for it if it will be needed
  2. We keep our normal input box cleaner and easily reusable
  3. Will create conflicts with other PR's that are currently active

So in a scope of this PR, lets not touch conversation.tsx

Thank you!
Kind Regards,
Alex

@utin-francis-peter
Copy link
Contributor Author

One note before merging, is lets not create a component for input box from conversation.tsx for a few reasons:

  1. Its better to create separate component for it if it will be needed
  2. We keep our normal input box cleaner and easily reusable
  3. Will create conflicts with other PR's that are currently active

So in a scope of this PR, lets not touch conversation.tsx

Thank you! Kind Regards, Alex

Hi, Alex.

During the first iteration I created a TextInput component which rendered a textarea element. While attempting to use it across the application, I noticed I was over-engineering and stopped.

In the next iteration I created separate custom Input and TextArea components for separation of concerns. The Input replaced all input elements, while the TextArea replaced the div contentEditable in Conversation.tsx file.

Do I move out TextArea component and its use in the Conversations.tsx file into a seperate PR?

@dartpain
Copy link
Contributor

dartpain commented Jul 7, 2024

Yes, lets move it for now as we have few PR's open that will change it.
We can make those changes later on once all pr relating to that TextArea are mergerd.
Ill give you a ping

@utin-francis-peter
Copy link
Contributor Author

Yes, lets move it for now as we have few PR's open that will change it. We can make those changes later on once all pr relating to that TextArea are mergerd. Ill give you a ping

Please a quick one, Alex:

Do I leave the textArea component and its type definition as it is in the branch; but not use the component in the Conversations.tsx file?

So it's there but not used in the specified file until all PRs using the current div contentEditable are closed?

@dartpain
Copy link
Contributor

dartpain commented Jul 9, 2024

Just don't use textArea yet, you can remove it in this pr for now

Thank you!

Copy link
Contributor

@dartpain dartpain left a comment

Choose a reason for hiding this comment

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

Thank you!

@dartpain
Copy link
Contributor

I missed it myself, seems like we have 1 warning
src/components/TextArea.tsx(2,10): error TS2305: Module '"./types"' has no exported member 'TextAreaProps'.

@utin-francis-peter
Copy link
Contributor Author

I missed it myself, seems like we have 1 warning src/components/TextArea.tsx(2,10): error TS2305: Module '"./types"' has no exported member 'TextAreaProps'.

Arrgggghh.

So sorry, Alex.

@dartpain
Copy link
Contributor

No worries at all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Create reusable input field component and cleanup code
3 participants