New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After Updating/Deleting/Adding a segment, force a refresh of the dashboard #10969
Conversation
} else { | ||
return broadcast.propagateNewPage('segment=' + segmentDefinition, true); | ||
} | ||
return broadcast.propagateNewPage('segment=' + segmentDefinition, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this always do a reload? Also when not editing segment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a big downside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is what we need to do, force a page reload to ensure the state of segment editor is valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a big downside that when adding/updating segments the page will reload. But we can't afford to introduce other bugs in this release. maybe we can patch the editor to work well without reload in 3.1 or so (without doing full rewrite which we can't do at this time).
Good thing is that changing segments still load fast..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it but looks like it would also do a reload when changing the segment. If that's the case it would be no good.
What are the bugs? maybe it would be a simple fix instead of just reverting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One bug is #10626 and another I found while testing, that segment attributes such as "Available to all users" are not restored when re-editing the segment right after, causing actually a user editing multiple times a segment to lose some changes if not careful. Would be really great to have in 3.0.x even!
I wouldn't say anything if it was only when adding or deleting, but this is also when switching a segment and this hugely decreases the usability and performance etc. |
Yes definitely agree... will try to work on this later today #10972 |
the refresh is currently needed for not only this one bug, but other bugs as well. The Segmentation editor JS was not implemented in a modern way and segment listing is buggy without the page reload after a change to segments.
Later sometime we'll rewrite the Segment Editor in AngularJS later so this reload will not be needed and the segment editor will be responsive and easy to use on mobile.
fixes #10626
Reverting 5daf6c2
part of 0c9c30b