Giter VIP home page Giter VIP logo

Comments (8)

jtkeyva avatar jtkeyva commented on May 26, 2024 1

Awesome, congrats on all the progress! Gonna try it out today :)

from advstory.

jtkeyva avatar jtkeyva commented on May 26, 2024 1

Awesome!

from advstory.

ertgrulll avatar ertgrulll commented on May 26, 2024

cluster may seem a bit abstract, but it's really necessary. For example, let's say you have users and their stories. Tapping a story tray sends a request to your database to fetch the user's stories. In such a case, you can create story trays without consuming resource and only create groups of stories (clusters) as needed.

clusterCount is the same as the number of trays. Let's say you have 10 users and each has 3 stories, cluster represents a user's all stories. clusterCount should be 10 in this case and storyCount is 3 for each cluster.

from advstory.

jtkeyva avatar jtkeyva commented on May 26, 2024

Thanks for the explanation, gonna ponder this a bit, but here's my initial thoughts.

I think Cluster is a good concept. It's essentially a group of stories right?

A story is a group of items/content/slides/pages right? Traditionally, a user only ever has 1 never ending story where content evaporates after 24 hours. A user doesn't necessarily have more than 1 story. However, they continually add content to their story. However, even if a user does have more than 1 story; say "my trip to the grocery store" and "me playing the piano".
The trip Story has 7 items: walking, the stoplight, a dog, the storefront, in the store, picking fruit, checkout.
The paino Story has 5 items: warming up, sheet music, playing chopsticks, playing mozart, laughing at a screw up.

"August 02, 2016. Today, we're introducing Instagram Stories, a new feature that lets you share all the moments of your day, not just the ones you want to keep on your profile. As you share multiple photos and videos, they appear together in a slideshow format: your story."

I think of the tray as a collection of different user's stories. Which to me sounds the same as what a cluster is. So a tray holds a cluster? So then essentially, a page could have 1,3,5,20,100+ different trays/clusters correct?

from advstory.

ertgrulll avatar ertgrulll commented on May 26, 2024

I think you are talking about something like:

// Somewhere in code
final trays = await myApi.getFeedTrays();

AdvStory(
  // 5 user shared 1 or more pics/videos.
  storyCount: 5,
  storyBuilder: (storyIndex) async {
    // Fetch user story, this story can include 1-20 media.
    final story = await myApi.getStory(id: trays[storyIndex].owner.id);

    return Story(
      itemCount: story.itemCount,
      itemBuilder: (itemIndex) => ImageItem(url: story.items[itemIndex].url),
    );
  },
  trayBuilder: (storyIndex) => AdvStoryTray(url: trays[storyIndex].coverImage),
);

clusterCount -> storyCount
clusterBuilder -> storyBuilder
Cluster -> Story

storyCount -> itemCount
storyBuilder -> itemBuilder
*Story -> *Item

Am I right? If that's less confusing, I can change names in next version. I just used 'story' as the sole media and 'cluster' as the media group. Story seems like a singular word to me, so I used the term 'cluster' to represent a media group owned by the same user, whether that group contains 1 or 100 images/videos.

from advstory.

jtkeyva avatar jtkeyva commented on May 26, 2024

Yeah, you got it. I think that fully makes sense. I'm wondering if "item" is the right word? I dunno, naming is pretty tough sometimes. Up to you but I think I'm leaning a bit towards slide or content.

Generic, but not vert indicative
storyCount -> itemCount
storyBuilder -> itemBuilder
*Story -> *Item

Content is decent
storyCount -> contentCount
storyBuilder -> contentBuilder
*Story -> *Content

Slide is a bit more descriptive
storyCount -> slideCount
storyBuilder -> slideBuilder
*Story -> *Slide

Page might be a bit confusing
storyCount -> pageCount
storyBuilder -> pageBuilder
*Story -> *Page

Thanks for your efforts and taking feedback :) I'll try to contribute code too, but I've never submitted a PR

from advstory.

jtkeyva avatar jtkeyva commented on May 26, 2024

Also I think this is confusing as well:

ImageStory, VideoStory or WidgetStory

I think ImageSlide, VideoSlide or WidgetSlide or ImageContent, VideoContent or WidgetContent makes more sense.

from advstory.

ertgrulll avatar ertgrulll commented on May 26, 2024

Confusing names changed, changelog includes details. I'm closing issue.

from advstory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.