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

troublshooting Filters #14

Open
3 tasks
selineriz opened this issue Oct 15, 2024 · 1 comment
Open
3 tasks

troublshooting Filters #14

selineriz opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@selineriz
Copy link
Collaborator

@christinerogers:
test page is : https://3design.github.io/gbc/network-test/

Not clear if still to be tried :

Deciding how/if to configure / deploy for the news/event page :

  • for network expertise they filters are all Selected default On -> clicking deselects and removes ppl from view
  • for Events, we want all events visible, and in 1 click a filter should show "only" that type of news/events -> click to exclusively select instead of deselect
  • (or do we...?)

Steps so far (aug 29):
Duplicated page and un-commented the code on line 81-90 to show the filter again
Successfully added a new filter as per the README. The file to edit filters is located in /src/_data/expertiseTags.json
This new tag can be added by editing the file /src/raw_data/people.tsv
examined the code on network-test.njk. The code that defines the filter is on line 76 using x-data in the

. x-data is part of a JS library https://alpinejs.dev/.
looked up information on x-data on the alpine site here: https://alpinejs.dev/directives/data
in the code of network-test.njk on line 76 and elsewhere, there is a call for the file expertiseTags.tags . Did a search on my local folder for this file and the only hit is the .json file

@3design:
e.g. there is both Leeds people.tsv and the Leeds people.json -- both seem to have tags, so which ones matter?

From what I understand, the tags themselves are declared in the expertiseTags.json file. This is what will show up on the webpage.

The tags in Leeds people.tsv are then used to tag the individuals by entering the appropriate tags declared in the expertiseTags.json.

When the site is built, the file Leeds people.json is created and used to populate the Network page.

My next questions are:

  1. How do we add a filter to the 'resources' page. What files need to be created to drive the filtering?
  2. How do we create a tags entry for each individual 'njk' file in the resources folder (where the new cards templates are read)

Old repo link: 3design/gbc#28

@christinerogers
Copy link
Collaborator

@3design since we are coming back to this after some weeks - any updates / thoughts here?

Take a look and see if any clues pop up in the codebase, or are your next 2 questions still --?

How do we add a filter to the 'resources' page. What files need to be created to drive the filtering?

How do we create a tags entry for each individual 'njk' file in the resources folder (where the new cards templates are read)

Thanks -- let us know the status / updates here.

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

No branches or pull requests

3 participants