-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
app/controllers/tag_controller.rb
Outdated
|
||
def topic_tree | ||
end | ||
|
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.
Trailing whitespace detected.
app/controllers/tag_controller.rb
Outdated
@@ -566,4 +566,8 @@ def fetch_counts | |||
@nodes.size | |||
end | |||
end | |||
|
|||
def topic_tree |
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.
Put empty method definitions on a single line.
Codecov Report
@@ Coverage Diff @@
## main #11230 +/- ##
=======================================
Coverage 82.45% 82.46%
=======================================
Files 98 98
Lines 5992 5993 +1
=======================================
+ Hits 4941 4942 +1
Misses 1051 1051
|
This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here: |
This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here: |
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 |
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:
***@***.***>
|
Code Climate has analyzed commit 04e38fc and detected 0 issues on this pull request. View more on Code Climate. |
Done! Do you want me to squash the commits? @jywarren |
This pull request generated screenshots of many common pages in the running app. You should be able to download and view them here: |
<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> Water</summary> |
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 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?
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.
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?
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.
Sorry! OK, so we moved part of this to here: #11380, where we are setting up a way to request the sub-topics.
And no worries about squashing, GitHub handles all that! |
Fixes #11229
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
Screenshots:
rake test
@publiclab/reviewers
for help, in a comment below