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

[explorer] fix: search namespace without dash #1152

Merged
merged 3 commits into from
Feb 14, 2023

Conversation

AnthonyLaw
Copy link
Member

What was the issue?

  • when the user searches the namespace containing -, it not working in explorer, the reason is that the search box is defaulted removed -.
  • we used to removed - to prevent the address with a dash.

What's the fix?

  • we will keep the - in the search box because the namespace allows the string contain a dash.
  • we no longer use - in our address format (for example wallet), so it won't affect address search.

@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for explorer-dev ready!

Name Link
🔨 Latest commit 6b6cb4b
🔍 Latest deploy log https://app.netlify.com/sites/explorer-dev/deploys/63ebd8ef3abe71000864ad67
😎 Deploy Preview https://deploy-preview-1152--explorer-dev.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 settings.

cryptoBeliever
cryptoBeliever previously approved these changes Nov 23, 2022
__tests__/store/ui.spec.js Outdated Show resolved Hide resolved
__tests__/store/ui.spec.js Outdated Show resolved Hide resolved

inputValues.forEach(({input, pageName}) => runBasicWhitespaceTests(pageName, input, {
pageName,
param: input.replace(/\s/g, '')

Choose a reason for hiding this comment

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

consider adding expected to last object and then

param: expected ? expected : input

Copy link
Member Author

Choose a reason for hiding this comment

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

consider adding expected to last object and then

I am confused about this.

the object below is considered as expectedResult

{
    pageName,
    param: input.replace(/\s/g, '')
}

param: expected ? expected : input

why do we need this?

@AnthonyLaw AnthonyLaw force-pushed the task/search-namespace-without-dash branch from a102bfc to 6b6cb4b Compare February 14, 2023 18:54
@AnthonyLaw AnthonyLaw merged commit 1d2d6fe into dev Feb 14, 2023
@AnthonyLaw AnthonyLaw deleted the task/search-namespace-without-dash branch February 14, 2023 19:10
AnthonyLaw added a commit that referenced this pull request May 16, 2023
* [explorer] fix: search namespace without dash

* [explorer] task: refactor UI store unit test

* [explorer] task: patch update on UI store
AnthonyLaw added a commit that referenced this pull request May 16, 2023
* [explorer] fix: search namespace without dash

* [explorer] task: refactor UI store unit test

* [explorer] task: patch update on UI store
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.

Not able to search namespace with dash on the end
3 participants