Giter VIP home page Giter VIP logo

Comments (14)

elotroalex avatar elotroalex commented on June 27, 2024

This one looks like we have two hard choices. Either remove the sort liquid command in the collection_gallery.html file; OR, fill the data with N/A or None, or whatever. @amzoss what do you think? Should we remove it globally? Or let people know?

from wax-facets.

elotroalex avatar elotroalex commented on June 27, 2024

@quinnanya it looks like this is a liquid problem, not a Wax/Facets problem. One possible solution could be for us to declare some keyword to be a special value we can filter for. It could be "na" or something like that. Then everytime we encounter that we don't list it. Quinn, correct me if I'm wrong, but the goal here is to have empty values NOT show up on the facet menu, right?

from wax-facets.

quinnanya avatar quinnanya commented on June 27, 2024

from wax-facets.

elotroalex avatar elotroalex commented on June 27, 2024

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

Okay, question for @quinnanya - what does the .md for the object look like? for example, if an object has a null in object_type, does the object markdown file have:

  1. no line for object_type
  2. object_type:
  3. object_type: (space at the end)
  4. object_type: ''
  5. something else?

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

Basically, I'm having trouble reproducing this, and I'm sort of surprised this is happening if there's just a few null values but some objects do have values. The line in question ({% assign options = collection | map: item | compact | uniq | sort_natural %}) uses "compact" to get rid of nil values. Are you sure there isn't a field in there that has absolutely no objects with data? Like, maybe there is a typo in the field name?

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

(Actually, I can't even get the build to fail with a typo now. Maybe that's not what we want, but at least the page loads for troubleshooting!)

from wax-facets.

quinnanya avatar quinnanya commented on June 27, 2024

It looks like I have one Problem File, at least w/ the genre and object type filters, and it's type 3 (with a space after the label): https://raw.githubusercontent.com/quinnanya/wax-documentation/master/_brueghel/18635.md

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

Okay okay, so, I've downloaded your repo and I've been trying various things. I think I have an answer, but it's not very satisfying.

As far as I can tell, it's not a problem with the markdown file or our include code. Your repo works fine if you facet on any combination of object_type, genre, and location_city, even with the null values. It only breaks when you add "tags" to facet_by, and that breaks it no matter what. It actually even breaks the original Wax include.

So I think what we're dealing with is the fact that "tags" is a core Jekyll concept/reserved word. I think having a column in your dataset called tags may always break facets. If you wanted to rename the tags column in your metadata file and rerun the Wax tasks, you could confirm this for sure. But right now, I don't think there's anything we can change in our include to get 'tags' to work. (On my machine, the repo failed to build even if the include file is completely empty, so I think Jekyll was just refusing to parse the string 'tags' in an input variable in any way.)

If anyone else has any ideas on how to... escape?... the name 'tags' in the input declaration, that'd be great! But I think it may just be better practice to recommend that people avoid using Jekyll reserved words like tags for field names.

Recommend we close this, as null values actually seem to work as expected.

from wax-facets.

elotroalex avatar elotroalex commented on June 27, 2024

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

Good call! Yes, that would be a good solution. Do you think that kind of recommendation would be good to add to the Wax wiki docs?

from wax-facets.

quinnanya avatar quinnanya commented on June 27, 2024

I think this is my fault -- the tags (which should've been _tags) were something I added because this project needed a clickable taxonomy. Happy to write something for the Wiki wax docs if other people need it too, though!

from wax-facets.

elotroalex avatar elotroalex commented on June 27, 2024

from wax-facets.

amzoss avatar amzoss commented on June 27, 2024

I went ahead and proposed something for the docs! I think we can close this issue.

minicomp/wiki#29

from wax-facets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.