Skip to content

Conversation

@VincentGalloro
Copy link
Contributor

Screenshot 2024-04-23 at 10 55 41 AM

TODO (in future PR): Make the fonts look nicer

@linear
Copy link

linear bot commented Apr 23, 2024

CI-3213 [MVP] Create Zero Results Page

Business Outcome:

  • As a Consumer I want Zero Results to be handled OOO so that I can fully port over my current implementation to use Constructor's OS UI Library

Definition of done:

  • Create a component for Zero Results
    • Might render Browse and Search differently
  • Use it in Search/Browse Grid if available
  • Simple Tests
  • Simple Documentation

Additional notes

Screenshot 2024-03-02 at 2.52.23 AM.png

Figma link : https://www.figma.com/file/bWsxaLJGgHTX9ystM0Ko5Z/Open-Source-Demo?type=design&node-id=289-35578&mode=design&t=QUyBZ4zxNmXeptFy-4

@VincentGalloro VincentGalloro requested review from a team, Mudaafi and mocca102 April 23, 2024 15:17
Copy link
Contributor

@Mudaafi Mudaafi left a comment

Choose a reason for hiding this comment

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

I know it's a simple component but could we make it into it's own separate component file? We'll need to reuse it for Browse in the future so I think it makes sense to have it separately.

On a separate note, could we also add another story under SearchResults? This would be specifically for zero results. We'll want to track changes to it via chromatic. Something like this should work:

export const ZeroResults: Story = {
  render: (args) => (
    <CioPlp apiKey={DEMO_API_KEY}>
      <div>Example Url: https://www.example.com?q=cvwdacoknqeauosd1</div>
      <br />
      <SearchResults {...args} />
    </CioPlp>
  ),
  decorators: [
    (Story) => {
      const url = new URL(window.location as any);
      // eslint-disable-next-line @cspell/spellchecker
      url.searchParams.set('q', 'cvwdacoknqeauosd1');
      window.history.pushState({}, '', url);

      return <Story />;
    },
  ],
};

@Mudaafi
Copy link
Contributor

Mudaafi commented Apr 23, 2024

I also added the font-change story CI-3432 👍 I can take it later today

@VincentGalloro
Copy link
Contributor Author

I know it's a simple component but could we make it into it's own separate component file? We'll need to reuse it for Browse in the future so I think it makes sense to have it separately.

On a separate note, could we also add another story under SearchResults? This would be specifically for zero results. We'll want to track changes to it via chromatic. Something like this should work:

export const ZeroResults: Story = {
  render: (args) => (
    <CioPlp apiKey={DEMO_API_KEY}>
      <div>Example Url: https://www.example.com?q=cvwdacoknqeauosd1</div>
      <br />
      <SearchResults {...args} />
    </CioPlp>
  ),
  decorators: [
    (Story) => {
      const url = new URL(window.location as any);
      // eslint-disable-next-line @cspell/spellchecker
      url.searchParams.set('q', 'cvwdacoknqeauosd1');
      window.history.pushState({}, '', url);

      return <Story />;
    },
  ],
};

done. It's failing the spellcheck check even with the eslint line but hopefully that's not an issue

@VincentGalloro VincentGalloro requested a review from Mudaafi April 23, 2024 22:00
Copy link
Contributor

@Mudaafi Mudaafi left a comment

Choose a reason for hiding this comment

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

lgtm! We'll probably want to replace
// eslint-disable-next-line @cspell/spellchecker

with
/* cspell:disable-next-line */

That'll probably fix the failing spellcheck

@VincentGalloro VincentGalloro merged commit 87ef7ef into main Apr 24, 2024
@VincentGalloro VincentGalloro deleted the ci-3213/create-zero-results-page branch April 24, 2024 14:28
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.

3 participants