Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.

Multiple views sticky state #213

Closed
gilsmdt opened this issue Jun 26, 2015 · 18 comments
Closed

Multiple views sticky state #213

gilsmdt opened this issue Jun 26, 2015 · 18 comments
Assignees
Milestone

Comments

@gilsmdt
Copy link

gilsmdt commented Jun 26, 2015

Hi,

I've have this setup

  1. Primary view (sticky + DSR)
  2. Secondary view (sticky + DSR)
    2.1 nested view
  3. getting into state A in primary view
  4. getting into state B in primary view
  5. getting into state C.C1 in secondary view
  6. getting into state C.C2 in secondary view

for some reason when changing to state C2 in secondary view the state in Primary view is changed.
Is this a bug or it's not supported to have sticky views in multiple views?

@gilsmdt
Copy link
Author

gilsmdt commented Jun 27, 2015

Hi,

I've checked it with version 0.13 and it works fine.
Something changed on 0.14 that causes this issue.

@jsniffen
Copy link

jsniffen commented Jul 7, 2015

Adding my plunker with the same problem. Version 0.13 does not have this issue.

http://plnkr.co/edit/6ZQscNVqlNhzaqCwRyrp?p=preview

@winniehell
Copy link

I made a similar example before finding this issue.

Select

  • Bacon
  • Jellyfish
  • Garlic
  • Spam
  • Octocat

in that order and you'll end up with I like Bacon with Octocat! though Spam is selected.

0.0.14 does not work: http://plnkr.co/edit/8GLYjQ?p=preview
0.0.13 works: http://plnkr.co/edit/FKCRwK?p=preview

@christopherthielen
Copy link
Owner

@winniehell both plunks behave the same for me, unless I'm misunderstanding something.

@winniehell
Copy link

Strange, this is how it looks for me in Firefox:

0.0.13

0 0 13

0.0.14

0 0 14

@winniehell
Copy link

It is important to have the exact same order as I have written it above for the bug to appear. This works for example:

  • Bacon
  • Garlic
  • Spam
  • Jellyfish
  • Octocat

@vellotis
Copy link

I ran into the same bug. Before I found this issue report I made this plunker.

At the same time v0.0.13 works without issues for my plunker.

@asoesilo
Copy link

+1 in v0.0.14. It works after I switch back to v0.0.13.

@christopherthielen christopherthielen added this to the 0.0.15 milestone Oct 3, 2015
@christopherthielen christopherthielen self-assigned this Oct 3, 2015
@christopherthielen
Copy link
Owner

dupe #212

@christopherthielen
Copy link
Owner

@winniehell I believe I have a fix for #217 which fixes your plunker:

http://plnkr.co/edit/uu5EQFUEcKrwKnuuqrZv?p=preview

Also, it's interesting to note that I can't get your plunker to fail using Chrome. Using Firefox, it fails just like you describe.

@christopherthielen
Copy link
Owner

@vellotis your plunker is fixed by removing the "sticky: true" on the .one and .two substates. Sticky states must have a unique named ui-view to plug into. If you need one/two to be sticky as well, create named ui-views for them.

http://plnkr.co/edit/55eg8Ln5bp3YDswWgThu?p=preview

@christopherthielen
Copy link
Owner

@juliansniff With a little tweak, your plunker is solved with the fix for #217

Multiple sticky states cannot "share" a named view (in your plunk, they're both trying to use 'main' named view). I pulled the sticky state up to a parent state, then made home and about as children to the parent sticky state.

http://plnkr.co/edit/3aYRAwsZ53RAXtA1VXeE?p=preview

@vellotis
Copy link

vellotis commented Oct 5, 2015

I played around with your improved plunker. It still misbehaves. Modified the order of these links: http://plnkr.co/edit/rxsFx0WPxbbu4Yz0WSfD?p=preview

@christopherthielen
Copy link
Owner

@vellotis sorry, I needed to plug in the new 0.0.15-pre2 with the fix for #217 for your plunk as well

http://plnkr.co/edit/Lvud4PKb27T2qYURVKCK?p=preview

@christopherthielen
Copy link
Owner

@vellotis ping, can you confirm please?
Everyone else can you read my comments? I think this issue is ready to be closed.

@vellotis
Copy link

vellotis commented Oct 9, 2015

@christopherthielen Sry. I confirm that it is working and you can close the issue.

@gilsmdt
Copy link
Author

gilsmdt commented Oct 9, 2015

Looks good on the plnkr.
I'll test it after the weekend on our code and verify.

Thanks for handling it.

@christopherthielen
Copy link
Owner

Closing as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants