Closed luisherranz closed 7 years ago
Actually, I wasn't working on this. My branch (change-slide) was created because, right now, when you open a post from PostList, it doesn't open that Post, but the one with the activeSlide
index that it's already in the store
. This is because the Link
component won't accept an onClick
callback, and there is where we were sending the action ACTIVE_POST_SLIDE_CHANGE_REQUESTED
.
That said, I can work on this issue as well. Just let me know if I should start with it.
Ok! Well, you can work on this then 😁
About that: Instead of sending an action, why don't you initialize the Slide on the correct post ID using the new getId
selector from the router?
Yep, I was thinking about how to make it render properly the first time, without changing the index. I'll try that.
Great! Let me know how it goes.
On Mon, Aug 21, 2017, 08:42 Eduardo Campaña notifications@github.com wrote:
Yep, I was thinking about how to make it render properly the first time, without changing the index. I'll try that.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/worona/saturn-app-theme-worona/issues/90#issuecomment-323659269, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJvunWbJRDjgAfS8XxNvsF-awM3S7YSks5saSbCgaJpZM4O7pld .
I'm going to start working on this issue, but I don't understand why do you want me to create an ROUTE_CHANGE_REQUESTED
on connection
if there is already one in router
. Can I not use that one?
There's not, there's only a STARTED and FINISHED actions. But you are
right, it could live in the router instead. Actually, router knows about
type
and id
so... Maybe Link
should also be in the router. Feel free
to move all that to the router.
On Mon, Aug 21, 2017, 11:44 Eduardo Campaña notifications@github.com wrote:
I'm going to start working on this issue, but I don't understand why do you want me to create an ROUTE_CHANGE_REQUESTED on connection if there is already one in router. Can I not use that one?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/worona/saturn-app-theme-worona/issues/90#issuecomment-323698265, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJvuoq3EXsEPGvkWybB8vMRHma-G82Dks5saVGXgaJpZM4O7pld .
Maybe I'm looking somewhere else but:
So far, with those actions, I've got the route change working, but it breaks when slides are passed too fast.
Ok. It looks like I created the action, but with asPath
instead of type
and id
(like Link
). Don't worry too much if you don't get it working
perfectly. We'll look at it next week.
On Mon, Aug 21, 2017, 15:12 Eduardo Campaña notifications@github.com wrote:
Maybe I'm looking somewhere else but:
So far, with those actions, I've got the route change working, but it breaks when slides are passed too fast.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/worona/saturn-app-theme-worona/issues/90#issuecomment-323741071, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJvummuk4yWriATdH9UagYyy8NqHp9Lks5saYJBgaJpZM4O7pld .
@orballo what's still not working here?
@luisherranz It's working, but the actions are sent when the animation starts, so the animation is not fluid.
Ok, thanks. We'll leave it for now then.
On Tue, 29 Aug 2017 at 17:54 Eduardo Campaña notifications@github.com wrote:
@luisherranz https://github.com/luisherranz It's working, but the actions are sent when the animation starts, so the animation is not fluid.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/worona/saturn-app-theme-worona/issues/90#issuecomment-325709247, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJvulHniXVbRdOwTNyd1kpYyIRzEF4vks5sdDQ_gaJpZM4O7pld .
@orballo I saw you started working on this as well. I also had a branch but you can continue with it.
I thinks the best way to approach this would be in the
connection
package. I'd define an action and type called ROUTE_CHANGE_REQUESTED which getstype
andid
as arguments. Then, I'd do a saga listening for those actions which usesRouter.push
from@worona/next/router
to change the url and has the same logic than theLink
component ofconnection
, retrieving the necessary permalink for theas
parameter from the state. Finally, in thesaturn
theme, I'd use a saga to listen to all theACTIVE_POST_SLIDE_CHANGED
and dispatch theROUTE_CHANGE_REQUESTED
accordingly. For that, I'd include thepostId
in theactivePostSlideChanged
action.Don't take into account my branch because I was about to implement this in a more complex way.