Comments (14)
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.
@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.
from wax-facets.
from wax-facets.
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:
- no line for object_type
object_type:
object_type:
(space at the end)object_type: ''
- something else?
from wax-facets.
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.
(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.
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.
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.
from wax-facets.
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.
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.
from wax-facets.
I went ahead and proposed something for the docs! I think we can close this issue.
from wax-facets.
Related Issues (20)
- remove $dark-text from stylesheet
- additional dependency: font used for chevrons on facet drop down
- fix jquery error that breaks menu expansion code
- Update LICENSE file
- Go over link design and make more consistent
- "Liquid error" HOT 6
- Fix comment on facet_gallery include HOT 1
- It is not self evident that facets.js only loads on the browse page HOT 1
- Add How to Change card info on the Docs HOT 1
- Revert back to original Wax way of doing subsets HOT 1
- change facet_items thumbnails to relative urls
- Using facets in an existing Wax site
- add wax- prefix to facet classes
- facets filtering only works on some facets HOT 7
- Display multi-value facets without separator on item layout page HOT 2
- Faceted search with subcollections not faceted as expected HOT 1
- Is there a provision to refer images from CDN instead of images folder?
- Update nokigiri to 1.15.3 in Gemfile.lock
- Would love to have some Spanish language documentation for Wax 🙂
- images resizing when appearing via include HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wax-facets.