umap
umap copied to clipboard
Support date and number properties in facet search
Implementation of https://github.com/umap-project/umap/issues/1489 and https://github.com/umap-project/umap/issues/1488
For the record, here is what the date form looks like currently in the facet form on my computer:
For the record, here is what the date form looks like currently in the facet form on my computer:
Same here, Firefox support is not ideal for the moment:
Sorry, for the late response. Thanks for all the comments, will look into them now. ;)
For the record, here is what the date form looks like currently in the facet form on my computer:
Yes, I found that too during my testing. It's not optimal but the user can use the date picker to choose the date and the keyboard (numbers or arrows) to enter/change the time. Also, I would expect/hope that Firefox eventually fixes their implementation to fully support datetime-local. Thus, I went with it despite the lack of support from Firefox.
I refactored the code according to your suggestions. Support for number properties is now also given. I think the PR is in pretty good shape now. Thanks for the help and review! :)
Could you also add some basic integration tests (in umap/test/integration) ? I'd say one basic case and one case where the data does not match the facet key.
I've pushed as basic facet search test, so you can base new ones on this :)
hey @flammermann any time/interest in finishing this PR ? :)
hey @flammermann any time/interest in finishing this PR ? :)
Hi @yohanboniface, yes, I am still interested in finishing it. Unfortunately, my server crashed hard (harddrive/raid failure) shortly after my last comment/commit, so I could not continue. :/ But you got perfect timing, I finished recovery and rebuilding everything last Saturday and can now finally pick up this PR again. :)
Btw. I got lucky because I could export a lot of work on one of my maps that was not yet backed up properly from the still open browser tab. ;)
Sounds good!
Ideally, we'd need:
- some integrations tests for basic cases: in
umap/tests/integration/test_facets_browser.py, thenmake testorpy.test -xvv umap/tests/integration/test_facets_browser.pyto run only this file; for debuggingPWDEBUG=1 py.test…to make playwright run tests in a headfull browser - some js tests for the
calculateStepFromNumberutil, inumap/static/umap/test/Util.js, thenmake testjs
Do you have time/energy for that ? Otherwise I'll do it next week.
Work continues in #1763
