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

[Outreachy] All Posts Design #8848

Merged
merged 68 commits into from Dec 18, 2020
Merged

Conversation

RuthNjeri
Copy link
Contributor

@RuthNjeri RuthNjeri commented Dec 14, 2020

Fixes #8829 and #8830

  • 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

Screenshot 2020-12-17 at 17 26 54

Screenshot 2020-12-17 at 17 27 10

Screenshot 2020-12-17 at 17 27 35

Screenshot 2020-12-17 at 17 27 46

Screenshot 2020-12-17 at 17 27 58

@gitpod-io
Copy link

gitpod-io bot commented Dec 14, 2020

@RuthNjeri RuthNjeri changed the title [WIP] All Posts Design All Posts Design Dec 14, 2020
@RuthNjeri RuthNjeri requested review from jywarren, cesswairimu and sagarpreet-chadha and removed request for jywarren December 14, 2020 17:44
Copy link
Contributor

@sagarpreet-chadha sagarpreet-chadha left a comment

Choose a reason for hiding this comment

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

Code wise everything looks perfect :)
Design wise maybe the dropdown in mobile view leaves a white right margin which can be filled similar to how we see in social media apps.

@RuthNjeri
Copy link
Contributor Author

Thanks @sagarpreet-chadha! Just so I know I've understood, your suggestion is to have a right margin from the dropdown? By maybe pushing the dropdown to the left that will leave some white space on the right?

@jywarren
Copy link
Member

Hi, this is looking great. One thing we do on the /tag/outreachy - style pages is to use a Bootstrap style to hide the tab text when on narrower screens:

<li class="nav-item">
<a class="nav-link <% if @node_type == "note" %> active<% end %>" href="/tag/<%= params[:id] %>">
<i class="fa fa-file"></i>
<span class="d-lg-inline">
<span class="d-none d-md-inline"><%= t('tag.show.research_notes') %></span>
<span class="d-none d-sm-inline badge badge-primary"><%= params[:counts][:posts] %></span>
</span>
</a>
</li>

Maybe we can do the same here to get the buttons to line up on one line even on narrow screens?

Thanks @RuthNjeri ! This is awesome! Should we be looking to merge anything else before this from your project?

Great work!

@jywarren jywarren changed the title All Posts Design [Outreachy] All Posts Design Dec 14, 2020
test/functional/notes_controller_test.rb Outdated Show resolved Hide resolved
test/functional/notes_controller_test.rb Outdated Show resolved Hide resolved
test/functional/notes_controller_test.rb Outdated Show resolved Hide resolved
<li class="nav-item">
<a class="nav-link <% if params[:action] == "recent" %> active <% end %>" href="/notes/recent"> <i class="fa fa-clock-o"></i><span class="hidden-sm hidden-xs"> <%= translation('notes.index.recent') %></span></a>
<a class="nav-link <% if params[:controller] == "notes" %> active <% end %>" href="/notes/" target="_blank"> <i class="fa fa-file"></i><span class="hidden-sm hidden-xs"> <%= translation('notes.index.research_notes') %></span></a>
Copy link
Member

Choose a reason for hiding this comment

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

Should these be target blank? Perhaps we could have them be regular links? but i'm very open to ideas if you'd like to share your reasoning! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, the research_notes link should not be target blank.. but I think for the rest of the links it makes sense for them to be since once you click on either question, wikis, or comments there's no way of going back to the notes section from those pages... unless you go back to the dashboard then click the 'all posts' link which is an extra step for the user in loading and reloading the pages... if this is not a problem, I can remove the target blank from the rest of the links too.

Copy link
Member

Choose a reason for hiding this comment

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

I think we could go with normal links for all, but i see your point too. Maybe we can brainstorm a bit on the UI design for this in follow-up (like, could we put a compact way to navigate back on the other pages? not sure.); i think your solution is good too, but we needn't let this hold us up. Thanks for thinking carefully and being flexible here!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I'll remove the target blank and we can follow it up more in the future..

app/models/node.rb Outdated Show resolved Hide resolved
@jywarren
Copy link
Member

Awesome work, @RuthNjeri - this is very exciting and we're almost done with this section!

@jywarren
Copy link
Member

Ah, and it looks like one of the tests changed conflicted with a change from @noi5e -- the notes_controller_test, but I hope it'll be an easy one to resolve. Please reach out if it causes you any trouble though! 🙌

@RuthNjeri
Copy link
Contributor Author

Hi, this is looking great. One thing we do on the /tag/outreachy - style pages is to use a Bootstrap style to hide the tab text when on narrower screens:

<li class="nav-item">
<a class="nav-link <% if @node_type == "note" %> active<% end %>" href="/tag/<%= params[:id] %>">
<i class="fa fa-file"></i>
<span class="d-lg-inline">
<span class="d-none d-md-inline"><%= t('tag.show.research_notes') %></span>
<span class="d-none d-sm-inline badge badge-primary"><%= params[:counts][:posts] %></span>
</span>
</a>
</li>

Maybe we can do the same here to get the buttons to line up on one line even on narrow screens?

Thanks @RuthNjeri ! This is awesome! Should we be looking to merge anything else before this from your project?

Great work!

Thanks! This PR would need to be merged first, but due to this feedback I'll have to update it before merging. I'll let you know once it's ready to be merged.

@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

❗ No coverage uploaded for pull request base (main@98c561e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8848   +/-   ##
=======================================
  Coverage        ?   81.85%           
=======================================
  Files           ?      100           
  Lines           ?     5934           
  Branches        ?        0           
=======================================
  Hits            ?     4857           
  Misses          ?     1077           
  Partials        ?        0           

@RuthNjeri
Copy link
Contributor Author

RuthNjeri commented Dec 17, 2020

Hi @sagarpreet-chadha I added some responsive styling on the navbar and the sort dropdown, let me know if it looks much better..
and @jywarren I've made the mobile view hide the navbar text, let me know if it looks okay.

Screenshot 2020-12-17 at 17 26 54

Screenshot 2020-12-17 at 17 27 35

Screenshot 2020-12-17 at 17 27 58

@jywarren
Copy link
Member

jywarren commented Dec 17, 2020 via email

@RuthNjeri
Copy link
Contributor Author

Hi @jywarren I tried the inline style but on the mobile responsiveness for the Galaxy Fold it was overlapping with the Sort Dropdown..I can look at it again tomorrow and let you know... I'll fix the conflicting files right now...

@jywarren
Copy link
Member

jywarren commented Dec 17, 2020 via email

@jywarren
Copy link
Member

This is great. I guess that means we are good to go to merge now? Thanks Ruth! Just ping me in the chatroom if you are ready to go and we can wrap this one up!

@codeclimate
Copy link

codeclimate bot commented Dec 18, 2020

Code Climate has analyzed commit d057e97 and detected 0 issues on this pull request.

View more on Code Climate.

@RuthNjeri
Copy link
Contributor Author

Hi @jywarren, I've added a responsive design for the inline issue I had with the Galaxy Fold..
The navbar is inline apart from the Galaxy Fold..

Once the tests pass, it should be good to go 🚀

Current Responsive Displays
Screenshot 2020-12-18 at 15 58 49

Screenshot 2020-12-18 at 15 58 34

Galaxy Fold Before

Screenshot 2020-12-18 at 16 02 44

Galaxy Fold After
Screenshot 2020-12-18 at 15 59 19

@RuthNjeri RuthNjeri closed this Dec 18, 2020
@RuthNjeri RuthNjeri reopened this Dec 18, 2020
@gitpod-io
Copy link

gitpod-io bot commented Dec 18, 2020

@RuthNjeri RuthNjeri closed this Dec 18, 2020
@RuthNjeri RuthNjeri reopened this Dec 18, 2020
@gitpod-io
Copy link

gitpod-io bot commented Dec 18, 2020

@jywarren
Copy link
Member

Fantastic!!!! Hooray!!!

@jywarren jywarren merged commit 2d3b9c8 into publiclab:main Dec 18, 2020
@cesswairimu
Copy link
Collaborator

🎉 🎉 🎉

manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* all posts design

* revert pagination code

* revert pagy code in wiki

* remove target blank from research note link

* optimize query and add test for hidden response id

* update styling

* fix tests

* styling

* remove target blank

* add columns in the hidden_response select

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* all_posts_route merge

* fix failing test

* revise node query

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* fix failing test

* revise node query

* add a revision for the hidden note test node

* remove trailing whitespace

* remove sidebar test

* make nav bar links responsive

* make navbar responsive

* cleanup and styling

* nav pills responsive design galaxy fold
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* all posts design

* revert pagination code

* revert pagy code in wiki

* remove target blank from research note link

* optimize query and add test for hidden response id

* update styling

* fix tests

* styling

* remove target blank

* add columns in the hidden_response select

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* all_posts_route merge

* fix failing test

* revise node query

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* fix failing test

* revise node query

* add a revision for the hidden note test node

* remove trailing whitespace

* remove sidebar test

* make nav bar links responsive

* make navbar responsive

* cleanup and styling

* nav pills responsive design galaxy fold
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* all posts design

* revert pagination code

* revert pagy code in wiki

* remove target blank from research note link

* optimize query and add test for hidden response id

* update styling

* fix tests

* styling

* remove target blank

* add columns in the hidden_response select

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* all_posts_route merge

* fix failing test

* revise node query

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* fix failing test

* revise node query

* add a revision for the hidden note test node

* remove trailing whitespace

* remove sidebar test

* make nav bar links responsive

* make navbar responsive

* cleanup and styling

* nav pills responsive design galaxy fold
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* all posts design

* revert pagination code

* revert pagy code in wiki

* remove target blank from research note link

* optimize query and add test for hidden response id

* update styling

* fix tests

* styling

* remove target blank

* add columns in the hidden_response select

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* all_posts_route merge

* fix failing test

* revise node query

* all posts route

* add to do item

* notes controller

* remove previous code and inline comments

* remove inline comments

* reuse published_notes for popular, recent, liked

* implements review feedback

* fix order and increase limit

* fixed tests

* revert pagy code in wiki

* optimize query and add test for hidden response id

* update styling

* fix tests

* add columns in the hidden_response select

* fix failing test

* revise node query

* add a revision for the hidden note test node

* remove trailing whitespace

* remove sidebar test

* make nav bar links responsive

* make navbar responsive

* cleanup and styling

* nav pills responsive design galaxy fold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All Posts Design
4 participants