BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] Add page pages/search.js to Storybook

Open RKC3000 opened this issue 2 years ago • 7 comments

Description

Description

All React components and pages need to be added to Storybook (in the nextjs branch)

Note Each item listed below for component/page should be in a new Issue and PR

  • [ ] pages/search.js

Screenshots

No response

Additional information

#1944 search component in the nextjs branch for storybook.

RKC3000 avatar Oct 18 '22 17:10 RKC3000

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Oct 18 '22 17:10 github-actions[bot]

Hey, Is this issue still open?

k99sharma avatar Oct 24 '22 09:10 k99sharma

Yes, I am working on this You can select one from #1944

RKC3000 avatar Oct 25 '22 19:10 RKC3000

Sure

k99sharma avatar Oct 27 '22 13:10 k99sharma

Is anyone working on this issue? I would like to take this up.

ThePiyushAggarwal avatar Feb 12 '23 11:02 ThePiyushAggarwal

There has not been any updates on this PR since a long time 🤔 You can go ahead @ThePiyushAggarwal

gptkrsh avatar Feb 12 '23 14:02 gptkrsh

Thanks! I am taking up this issue. I saw that we are using Storybook 7 beta version now, so I am thinking of looking into that a bit and raise PR for this issue by Friday 17th

ThePiyushAggarwal avatar Feb 12 '23 16:02 ThePiyushAggarwal

I am not able to make this work because there is a logger being used in the main page search.js

It is not allowing me to create a story based on the page.

image

Is there any other way to make use of the component in stories?

ThePiyushAggarwal avatar Apr 02 '23 18:04 ThePiyushAggarwal

I see that pages/search.js have not been added to storybooks yet. As nobody is working on this issue, I can take it up and start working on it.

Nanak360 avatar May 09 '23 02:05 Nanak360

I see that pages/search.js have not been added to storybooks yet. As nobody is working on this issue, I can take it up and start working on it.

@Nanak360 I will assign this to you

SaraJaoude avatar May 10 '23 12:05 SaraJaoude

I am not able to make this work because there is a logger being used in the main page search.js

It is not allowing me to create a story based on the page.

image

Is there any other way to make use of the component in stories?

I'm getting the same error. Did a lot of research to find a solution to this issue.

One possible solution is mentioned in this issue from pino. We'll have to add manual webpack congif and make sure that webpack uses the main package.json field instead of the browser field.

As mentioned [here](webpack to use the main package.json field instead of the browser field), there are ways to mock a import in storybook but it does not seem to work for this perticular case

Nanak360 avatar May 15 '23 16:05 Nanak360

When I started on this issue, I didn't read the description properly and just went into it. I raised a couple of PRs creating a story for the Search Input component not the whole page. At the end, I realized they want the whole page in storybook. I don't have much experience with storybook but I think storybook is used for managing and developing our components separately. Not the whole page. That is why I just unassigned myself. I may be wrong.

ThePiyushAggarwal avatar May 15 '23 16:05 ThePiyushAggarwal

One possible solution for this issue is to divide the search page into child components image

Page can be divided into 3 components (highlighted with yellow border)

  • Tags
  • Search bar
  • RandomUsersGroup (optional)

We can have separate storybooks for each Component and if needed, one story with all 3 components combined to look like the stories page

Nanak360 avatar May 21 '23 09:05 Nanak360

We are looking to redesign the site so refactoring into components will happen at that stage - as a result I will close this Issue for now.

SaraJaoude avatar May 29 '23 01:05 SaraJaoude