nomic-ai / atlas-stories-examples

Examples for atlas stories
0 stars 0 forks source link

Unable to See topics over the Topic model #4

Open ARPIT2128 opened 2 days ago

ARPIT2128 commented 2 days ago

Issue: Scrollyteller Not Rendering in Page Component and Encountering Missing Name or Derivation Error

Description

While working with the Scrollyteller component in page.tsx using the template from @nomic-ai/atlas-stories-react, I updated the code to include custom styling and additional parameters for Folio. However, upon running npm run dev to test the implementation, the component does not render as expected, and the console displays a critical error: "Must provide either a name or a derivation."

Steps to Reproduce

  1. Update page.tsx with the following code:

    
    "use client";
    import { Scrollyteller, Folio } from "@nomic-ai/atlas-stories-react";
    import "@nomic-ai/atlas-stories-react/dist/style.css";
    
    export default function Page() {
     console.log({ Scrollyteller });
    
     return (
       <div
         className="main"
         style={{
           margin: "50px",
           maxWidth: "calc(100vw - 100px)",
         }}
       >
         <h1>Atlas story</h1>
         <Scrollyteller map="sm8523/hate-and-harrasment-model-benchmarking/map/43840940-9cf6-42f6-9b05-3540bc7ea226">
           <Folio hash="rvP0" zoom={{ x: [-50, 50], y: [-50, 50] }}>
             This map is made of people. Each dot is a person, and the people are
             organized by similarity. It's like soylent green but with more
             famousness.
           </Folio>
         </Scrollyteller>
       </div>
     );
    }
5960-d38e9cff0473c555.js:1 Uncaught (in promise) Error: Must provide either a name or a derivation
    at o (5960-d38e9cff0473c555.js:1:33938)
    at 4391-af646b31f40318e6.js:1:178692
    at 4391-af646b31f40318e6.js:1:178807
    at Array.forEach (<anonymous>)...
RLesser commented 4 hours ago

Regarding that error, that is a known issue on the Atlas side. I don't believe it should impact the rendering of the map - for instance if you make a selection, save a shared state of that selection and enter it as the new hash, it should show the selection correctly even if the error appears.

Regarding the topic labels on stories, that is currently being worked on and should be default enabled by next week. Will update this issue once it's available.

Please let me know if there were other aspects of this problem I missed, and make additional issues if other problems are found.