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

[WIP]Make wiki/note page headings more minimal, based on the new style guide #6758

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

Ugtan
Copy link
Contributor

@Ugtan Ugtan commented Nov 9, 2019

Fixes #5956

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@welcome
Copy link

welcome bot commented Nov 9, 2019

Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help.
Dangerbot will test out your code and reply in a bit with some pointers and requests.
Also please refer here for installation help 💿
There may be some errors, but don't worry! We'll work through them with you! 👍🎉😄
It would be great if you can tell us your Twitter handle so we can thank you properly?

@Ugtan Ugtan force-pushed the make_wiki_note_heading_minimal branch from ee67e9c to a466d1c Compare November 9, 2019 21:53
@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 9, 2019

@publiclab/reviewers Please have a look. I will also attach the screenshots below. Thanks

Notes
Screenshot from 2019-11-09 20-15-23

Wiki
Screenshot from 2019-11-09 20-14-08

@jywarren
Copy link
Member

Hi this is awesome! We're you able to move the extra items into one of the menus instead? Thanks!

@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 10, 2019

Hey @jywarren, did you mean move the extra stuff that is removed like views, comments, etc of the wiki and notes to the sidebar button on the top right corner?

@jywarren
Copy link
Member

That's right - the round button with the ... icon. That way the functions are still available, they're just a bit more hidden!

Also note how we put the "edit" button in a circular button on pages like this: https://publiclab.org/notes/warren/11-30-2017/build-a-papercraft-spectrometer-for-your-phone-version-2-0

It'd be great to do the same with wiki pages like this! Do you think you could try implementing that?

@jywarren
Copy link
Member

These could fit into this dropdown here:

image

I think the code for this section is here: https://github.com/publiclab/plots2/blob/master/app/views/like/_like.html.erb

@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 12, 2019

It'd be great to do the same with wiki pages like this! Do you think you could try implementing that?

I can definately do that.

Okay. Thank you so much for the details. I will implement it soon.

@jywarren
Copy link
Member

Thanks, that's awesome! Just ping me if you need any help!

@jywarren
Copy link
Member

Hi, just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks!

@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 23, 2019

Hi, just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks!

Hey, I'm not stuck. I'm just having my exams so I'm a bit busy. But, i will try to do it by this weekend hopefully. Thanks

@Ugtan Ugtan force-pushed the make_wiki_note_heading_minimal branch from a466d1c to e82b81d Compare November 23, 2019 20:10
@Ugtan Ugtan force-pushed the make_wiki_note_heading_minimal branch from e82b81d to 81e2a92 Compare November 23, 2019 20:25
@jywarren
Copy link
Member

Hi, looks good! Can you upload a screenshot or gif of the menu open? Thanks!

@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 26, 2019

Hi, looks good! Can you upload a screenshot or gif of the menu open? Thanks!
Merge state

Here you go.
image
image

@jywarren
Copy link
Member

This looks great. Now it looks like a few tests that had been expecting to find "views" listed in the old location are now failing. Could you try adjusting the tests to look in the new location? The problem may be that the popups are constructed in JavaScript so they may not be actually visible to the functional tests (i.e. they don't appear in plain HTML). So we could remove them, or test for something else, or we could move them to system tests, which do run JavaScript.


ERROR["test_tag_blog", #<Minitest::Reporters::Suite:0x0000555f5c43b410 @name="TagControllerTest">, 5.811496078000005]
 test_tag_blog#TagControllerTest (5.81s)
ActionView::Template::Error:         ActionView::Template::Error: undefined method `views' for nil:NilClass
            app/views/like/_like.html.erb:92:in `_app_views_like__like_html_erb___306867212391491333_46934030695660'
            app/views/tag/blog.html.erb:65:in `block in _app_views_tag_blog_html_erb__3819743556353517424_46934031720500'
            app/views/tag/blog.html.erb:46:in `each_with_index'
            app/views/tag/blog.html.erb:46:in `_app_views_tag_blog_html_erb__3819743556353517424_46934031720500'
            test/functional/tag_controller_test.rb:353:in `block in <class:TagControllerTest>'

I guess the simplest seems to me to be just changing them to test for some of the new header text you've reduced things down to, rather than the text that is now hidden in the popover. What do you think?

@jywarren
Copy link
Member

Oh you know, actually this kind of looks like it's not failing in the view, but actually somehow we're passing a nil into the tests and they're trying to get nil.views instead of a node. Can you take a look at the error carefully and see if any change you made would have caused this? All three test failures reference the same kind of error.

@Ugtan
Copy link
Contributor Author

Ugtan commented Nov 26, 2019

Oh you know, actually this kind of looks like it's not failing in the view, but actually somehow we're passing a nil into the tests and they're trying to get nil.views instead of a node. Can you take a look at the error carefully and see if any change you made would have caused this? All three test failures reference the same kind of error.

Okay. I will try to figure it out.

<div>
<span>
<% if node.type == 'note' %>
<%= number_with_delimiter(@node.views) %> <%= t('notes.show.views') %>
Copy link
Member

Choose a reason for hiding this comment

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

Aha - here, i think we just need node.views and not @node.views! I'm going to try making this change to see if it works!!

@plotsbot
Copy link
Collaborator

plotsbot commented Dec 3, 2019

1 Warning
⚠️ There was an error with Danger bot’s Junit parsing: No JUnit file was found at output.xml
3 Messages
📖 @Ugtan Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 Pull Request is marked as Work in Progress
📖 #
Screenshots 📸 (click to expand)

6758-test_questions.png

6758-test_embeddable_grids.png

6758-test_signup.png

6758-test_viewing_the_settings_page.png

6758-test_tag_by_author_page.png

6758-test_wiki_page_with_inline_grids.png

6758-test_stats.png

6758-test_viewing_the_dashboard.png

6758-test_searching_an_item_from_the_homepage.png

6758-test_questions_shadow.png

6758-test_login_modal.png

6758-test_profile_page.png

6758-test_comments.png

6758-test_tags.png

6758-test_signup_modal.png

6758-test_wiki.png

6758-test_methods.png

6758-test_tag_page.png

6758-test_blog_page_with_location_modal.png

6758-test_tag_wildcard.png

6758-test_embeddable_thumbnail_grids.png

6758-test_front_page_with_navbar_search_autocomplete.png

6758-test_login.png

6758-test_viewing_the_dropdown_menu.png

6758-test_viewing_question_post.png

6758-test_mobile_displays.png

6758-test_simple-data-grapher_powertag.png

6758-test_front.png

6758-test_question_page.png

6758-test_tag_contributors_page.png

6758-test_blog.png

6758-test_people.png

6758-test_wiki_revisions.png

Learn about automated screenshots

Generated by 🚫 Danger

@jywarren
Copy link
Member

jywarren commented Dec 3, 2019

Hooray!!! This looks great. The test failure was pretty simple - just removing @ from some lines. Thanks a ton!!!

@jywarren jywarren merged commit c539db7 into publiclab:master Dec 3, 2019
@welcome
Copy link

welcome bot commented Dec 3, 2019

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to PublicLab.org in the next few days, but first it will be published to https://stable.publiclab.org/ (it will take some minutes for this to load, and until then you may see logs from the build process). Please test out your work on this testing server and report back with a comment that all has gone well!
Do join our weekly check-in to share your this week goal and the awesome work you did 😃. Please find the link pinned in the issue section 📝
Now that you've completed this, you can help someone else take their first step!
Reach out to someone else working on theirs on Public Lab's code welcome page. Thanks!

Help others take their first step

Now that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌

https://code.publiclab.org

Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕

People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉

Read about how to help support another newcomer here, or find other ways to offer mutual support here.

@Ugtan
Copy link
Contributor Author

Ugtan commented Dec 4, 2019

Hooray!!! This looks great. The test failure was pretty simple - just removing @ from some lines. Thanks a ton!!!

That was easy! Thank you so much for helping me out. :)

@jywarren
Copy link
Member

jywarren commented Dec 4, 2019 via email

vinitshahdeo pushed a commit to vinitshahdeo/plots2 that referenced this pull request Feb 1, 2020
…e guide (publiclab#6758)

* Make wiki/note page headings minimal, based on the style guide

* remove @
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.

Make wiki/note page headings more minimal, based on the new style guide
3 participants