-
Notifications
You must be signed in to change notification settings - Fork 23
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
Search Box v1 #6
Comments
Hi @saimeunt can I work on this? I'm a frontend developer, I'm good with Tailwind CSS,React and TypeScript and will deliver the search box as expected between 2 to 3 days. |
Hi @saimeunt I think I can work on this. I have implemented user interfaces before. I will first install the combo box using shadcn and create the search component. From the input determine if the input is a block number, txhash or an address(i.e validating the type of input on the client side) Txhash are very long made up of hex characters, block id are number like 1234567 while an address is alpha-numeric and starts with a specific prefix for networks. This will help me determine which of the viems public actions to use. Then call the viem public action in the chains.tx file. Set up routing using router.push in next js. |
Hi, @saimeunt I'm interested in developing the Search Box for the Op Scan. This is my first time contributing to a Walnut project as I wasn't opportune to get any frontend tasks in ODHack 4.0. With my solid background in Next.js, TypeScript, Shadcn, and React, I’m confident in delivering an efficient and user-friendly search functionality. You can check out my Github profile here: https://github.com/Benjtalkshow. Here is how I will implement my code: I will create the components/SearchBox.tsx for the search component and design the UI using Shadcn for responsiveness and accessibility. I'll implement Next.js API routes in pages/api/search.ts for search queries, and validate client-side input types (block number, tx hash, or address) using getBlock, getTransaction, and isAddress. Based on the validation, I will link to the appropriate detailed page. I'll include features like auto-suggestions, recent searches, and error handling to improve usability, ensuring real-time, accurate search results and a smooth user experience across all devices. |
hey Bhavya here! I have been working with frontend development for almost 2 years now. This issue seems very interesting to work on as it involves determining what input the user has put and implementing logic accordingly! I would love to add this feature if thats okay! To solve this issue I would
|
Hello Walnut Fam, I am a seasoned fullstack developer with a focus on front-end development. Although I haven't contributed to Walnut before, I am excited by your welcoming stance: "However, if you are new, don’t worry—we are eager to attract new talent..." I am passionate about creating responsive, modular, and scalable UI components and would love to take on this issue. Here are my profiles for your reference:
Best regards, |
Hello! I am Isaac. I've been working with frontend development technologies for over 2 years now and would love to work on this issue. Here's how I propose to solve this issue: First, I'll check if the string starts with '0x' to identify hexadecimal values. This would rule out block numbers, which are typically shorter integer values. Transaction hashes are usually 66 characters long (including the '0x' prefix) Using this logic, I can determine the type of string entered and display the correct labels in the combobox. When the user clicks or hits enter, I'll implement the correct redirection to the correct resource endpoint. I believe the best way would be to add the label to the user search input but perform the API call on page level after the user has navigated to the page by using the provided input gotten from the URL as a search parameter to perform the API call usingthe appropriate caller function. I believe this approach should provide a smooth user experience while being efficient on the backend. Of course, I'm open to any feedback or suggestions to improve this implementation! Let me know if you'd like me to proceed with this solution. I'm looking forward to contributing to this project! https://app.onlydust.com/u/Dprof-in-tech Thanks |
Request for Assignment: Search Box v1 IssueHello Walnut team, My name is Armando, and I am interested in working on the Search Box v1 issue. I have experience in developing with Next.js and React, and I believe I can effectively contribute to solving this problem. Plan to Resolve the IssueTo implement the search box functionality, I will follow an approach that prioritizes efficiency, clarity, and simplicity. Below are the steps I will take: Implementation of the Search Component
Performance Optimization with Debounce
Input Type Detection and Validation
Based on the detected type, the input will be validated:
Presentation of Results
Why This Solution is Optimal
I hope my proposal aligns with your needs. I am available to discuss any aspect of the plan and adjust it as necessary to fully meet the team's expectations. Thank you for considering my request. Best regards, |
Hello @saimeunt, I'm interested in implementing the Search Box for the Op Scan Project. This is my first time contributing to a Walnut project. With my 3 years of solid background in Next.js, TypeScript, Shadcn, and React, I’m confident in delivering an efficient and user-friendly search functionality. You can check out my GitHub profile here: https://github.com/Benjtalkshow. This is my second comment on this issue, demonstrating my keen interest in tackling it. Proposed Solution for Search Box v1
|
Wow a lot of very good comments on this one, thank you everyone for your interest. |
Search Box v1
Read contributors guidelines
User stories
As a user, when I paste an Address / Txn Hash / Block / Token in the search bar, I want to see a list of corresponding exact matches in a combobox, with the proper category displayed (Block / Transaction / Address).
When I click on a result, I want to be redirected to the detailed page of the resource.
Validation
The end result should look like the Etherscan search box:
As it is a v1, we want to keep it simple so no extra work on the UI is needed beyond what can be achieved with shadcn/ui combobox.
Implementation details
For the time being, we will validate client side the type of the input box (one of block number / tx hash / address) and display only one exact match result.
If the input is a block number, call
getBlock
to validate and display a result with a link to the block/block/:number
.If the input is a tx hash, call
getTransaction
to validate and display a result with a link to the tx/tx/:hash
.If the input is an address, call
isAddress
to validate and display a result with a link to the EOA/contract/address/:address
.Resources
getBlock
: https://viem.sh/docs/actions/public/getBlockgetTransaction
: https://viem.sh/docs/actions/public/getTransactionisAddress
: https://viem.sh/docs/utilities/isAddressThe text was updated successfully, but these errors were encountered: