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

Fixes #11229: Built topic-tree UI at /topic-tree #11230

Merged
merged 9 commits into from Jun 28, 2022

Conversation

KarishmaVanwari
Copy link
Contributor

Fixes #11229

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

Screenshots:
image
image

  • 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

@gitpod-io
Copy link

gitpod-io bot commented Jun 28, 2022


def topic_tree
end

Copy link

Choose a reason for hiding this comment

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

Trailing whitespace detected.

@@ -566,4 +566,8 @@ def fetch_counts
@nodes.size
end
end

def topic_tree
Copy link

Choose a reason for hiding this comment

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

Put empty method definitions on a single line.

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #11230 (04e38fc) into main (7dc150c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #11230   +/-   ##
=======================================
  Coverage   82.45%   82.46%           
=======================================
  Files          98       98           
  Lines        5992     5993    +1     
=======================================
+ Hits         4941     4942    +1     
  Misses       1051     1051           
Impacted Files Coverage Δ
app/controllers/tag_controller.rb 85.62% <100.00%> (+0.04%) ⬆️

@github-actions
Copy link

This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here:
https://github.com/publiclab/plots2/suites/7125429520/artifacts/282765661

@github-actions
Copy link

This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here:
https://github.com/publiclab/plots2/suites/7125620293/artifacts/282776540

@KarishmaVanwari
Copy link
Contributor Author

Hey @jywarren, @TildaDares, @cesswairimu, please have a look.

I am yet to add the links to the tags. Just wanted to confirm -- am I supposed to add link of the deployed version, like https://publiclab.org/wiki/agriculture for agriculture under Water?

@jywarren
Copy link
Member

jywarren commented Jun 28, 2022 via email

@codeclimate
Copy link

codeclimate bot commented Jun 28, 2022

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

View more on Code Climate.

@KarishmaVanwari
Copy link
Contributor Author

ah, can you use a relative link like /tag/water-quality?

On Tue, Jun 28, 2022, 3:45 PM Karishma Vanwari @.> wrote: Hey @jywarren https://github.com/jywarren, @TildaDares https://github.com/TildaDares, @cesswairimu https://github.com/cesswairimu, please have a look. I am yet to add the links to the tags. Just wanted to confirm -- am I supposed to add link of the deployed version, like https://publiclab.org/wiki/agriculture for agriculture under Water? — Reply to this email directly, view it on GitHub <#11230 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J4NNSJSQXQJX5TK6WTVRLXWFANCNFSM52B7FR6Q . You are receiving this because you were mentioned.Message ID: @.>

Done! Do you want me to squash the commits? @jywarren

@github-actions
Copy link

This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here:
https://github.com/publiclab/plots2/suites/7127142342/artifacts/282874820

<div id="accordion">
<div class="list-group">
<details>
<summary class="list-group-item list-group-item-action topic"><i class="fa fa-chevron-right" style="font-size: small;"></i>&nbsp;Water</summary>
Copy link
Member

Choose a reason for hiding this comment

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

This is great. OK, so let's merge this, get some feedback, and while we're talking through the visual side with folks, we can work on generating these lists programmatically with Ruby. My guess is we'll start with the top-level topics hard-coded, like:

[
  'agriculture',
  'air-quality'
]

Then we'll make up a new method in the tag controller that returns @child_tags. Calculating that will be a little harder - we'll look for all the wiki pages with the parent:______ tag, and then return all of their slug values (i.e. the short string corresponding with a tagname). So for water-quality we'd return @child_tags of a list of any wiki page slugs where the wiki page has the tag parent:water-quality. Does that make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup @jywarren, this makes a little sense to me.

My guess is we'll start with the top-level topics hard-coded, like:

Where would this be hard-coded?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry! OK, so we moved part of this to here: #11380, where we are setting up a way to request the sub-topics.

@jywarren jywarren merged commit cc1f57c into publiclab:main Jun 28, 2022
@jywarren
Copy link
Member

And no worries about squashing, GitHub handles all that!

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.

Build topic-tree UI at /topic-tree
2 participants