Comments (8)
Awesome, congrats on all the progress! Gonna try it out today :)
from advstory.
Awesome!
from advstory.
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.
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.
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.
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.
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.
Confusing names changed, changelog includes details. I'm closing issue.
from advstory.
Related Issues (20)
- Update Example Stories & JSON HOT 4
- How to update story content dynamically HOT 5
- AdvStoryController throws exception when jumpTo called on trayTap event HOT 3
- [BUG] Content Skip HOT 1
- Help wanted HOT 3
- onSlideChanged & onStoryChanged Functions HOT 3
- how to scroll up and down as instagram reels or tiktok videos ? HOT 1
- Sync Tray with Stories HOT 4
- Decouple to: Adv/Infinite PageView HOT 3
- AdvStory with Provider HOT 3
- 2022-10-16 10:00:45.237726-0700 Runner[66039:3355191] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Failed to load video: Cannot Open, null, null) HOT 1
- Change Background Color
- Bug in rtl app HOT 1
- Skip Viewed Content!
- Tweaking to behave a little more like an image gallery HOT 5
- safearea on Iphone 10++ HOT 3
- Stop Indicator When Story is Loading
- Custom Gestures HOT 5
- WidgetStory AnimationController exception HOT 5
- Web / MacOS / Windows / Linux Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advstory.