Skip to content
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

Remove the text from sitemap loading spinner #4

Conversation

tvdeyen
Copy link

@tvdeyen tvdeyen commented Apr 13, 2016

I'm still not satisfied, but I think this looks better without the text.

@@ -8,7 +8,7 @@ Alchemy.Sitemap =
@search_field = $("#search_field")
@filter_field_clear = $('.js_filter_field_clear')
@display = $('#page_filter_result')
@sitemap_wrapper = $('#sitemap-wrapper .sitemap-load-notice')
@sitemap_wrapper = $('#sitemap-wrapper')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code replaces that target with the sitemap. There's some CSS attached to #sitemap-wrapper. This will break that. Instead, there should be a dummy element within the wrapper which can be safely replaced with the sitemap itself.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you're using .replaceWith instead of .html that indeed replaces the element. Why?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because the same code also replaces a part of the tree when folding. It's a lot less JS plumbing to just replace the entire unlinked list that's being folded. Now we don't need to disable the spinner, for example. Now folding is basically the same as rendering the whole tree. Just from a different root.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I will change that this evening.

@jorrizza
Copy link
Owner

Thanks! I agree it looks better without text. I'll merge this asap. Probably this Monday. That's when I've got the whole rebase thing planned too.

@jorrizza jorrizza merged commit 86e7b4f into jorrizza:client-side-admin-pages Apr 19, 2016
@tvdeyen tvdeyen deleted the remove-text-from-sitemap-spinner branch April 19, 2016 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants