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: As a user, I want to be able to see the search results on Explorer #468

Merged
merged 21 commits into from
Dec 15, 2023

Conversation

voenkomatiwe
Copy link
Collaborator

What does this PR do?

#413

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for resilient-starburst-d5d6d9 ready!

Name Link
🔨 Latest commit 7b4654c
🔍 Latest deploy log https://app.netlify.com/sites/resilient-starburst-d5d6d9/deploys/657c24f630e58e0008af45d4
😎 Deploy Preview https://deploy-preview-468--resilient-starburst-d5d6d9.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.

explorer/src/components/SearchInput/index.tsx Outdated Show resolved Hide resolved
explorer/src/pages/Search/index.tsx Outdated Show resolved Hide resolved
explorer/src/pages/Search/index.tsx Outdated Show resolved Hide resolved
@Solniechniy
Copy link
Collaborator

Also, check out to searching the "https://linea.easscan.org/schema/view" string for example, something is broken

Copy link
Collaborator

@ars9 ars9 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e7288e) 93.63% compared to head (66a11fc) 93.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #468   +/-   ##
=======================================
  Coverage   93.63%   93.63%           
=======================================
  Files          20       20           
  Lines         330      330           
  Branches       76       76           
=======================================
  Hits          309      309           
  Misses         10       10           
  Partials       11       11           

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

@Solniechniy
Copy link
Collaborator

The main problem your facing is g flag in regexp. Return the previous solution with RegExp and just change this:

export const regexEthAddress = {
  byNumberOfChar: {
    42: /^0x[a-fA-F0-9]{42}$/m,
    64: /^0x[a-fA-F0-9]{64}$/m,
  },
  by0x: /^0x/,
};

Really weird issue, you can read there https://stackoverflow.com/a/30310596.

The next problem - is overusing parseSearch function and other components. We should do the logic much simpler in Search component and don't try to divide it between SearchAttestations, SearchSchemas and SearchModules almost duplicating that. The parseSearch function will works good at Search and can pass the needed params in modules instead of x3 times triggering in each component. By removing this logic from that modules the reason question is to keep the loading inside the modules or just create separate files\file that will return ready-to-use swr hooks that can be easily used in Search component. (or at least loadAttestationList, loadModuleList, loadSchemaList but seems that we can do hook).
So refactoring the Modules is required.

@Solniechniy Solniechniy merged commit 7d9be52 into Consensys:dev Dec 15, 2023
12 checks passed
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.

None yet

6 participants