Make columns sortable#289
Conversation
| <body>""" + | ||
| patchedBody + | ||
| " <script>\n" + | ||
| " window.addEventListener('DOMContentLoaded', function () {\n" + |
There was a problem hiding this comment.
this function moved into site.js.
Having the javascript in its own file make it easier to read it and evolve it. And then we can just inject the whole file when generating.
|
What about enforcing the format (supporting date and ranges) at build time? Then sorting is trivial. Think it was the first impl and is a must to be reliable |
|
@rmannibucau, I agree, but there is another issue about this (#208). It doesn't seem there is a consensus yet though. I'm fine to drop this PR or re-work it after there is a decision about #208. |
Sorry for the noise. I see now that you have been commenting and is aware of #208. Anyway, the thing is, this PR just get the sorting in place using the existing text format. No doubt a structured format is better if you want to sort, but I didn't want to solve #208 and add sorting in a single PR. Also because there is not decision about #208. |
|
my 2cts is that it is trivial to support MM-yy dd-MM-yyyy yyyy-MM-dd and iso format (by checking length and iphen positions) but yes I think #208 can be worth solving before this one since it does simplify a lot the automotion and potentially how we can make the site getting an API (potentially post processing raw data to generate a proper json) so in terms of "roadmap" (if it makes sens there) I would do it this way instead of going with hacks which bite later on indeed just my 2 cts, not a blocking comment at all |
|
Thank you for your contribution, @octonato! My 2c. I have two user flows for this repo: So for me the current format works. It doesn't seem like we reached any consensus on #208. @noctarius @bmvermeer @HanSolo do you have opinions on whether we need sorting? |
|
There are a few options in #208 (comment). I think the best would be separating start and end dates and using ISO 8601 to format them but this is also the one that needs the most effort. |
|
I put his PR in draft. Since it's a bloody hack, we should just wait for #208 to land in one or other form. Then we can revisit this one. |
Makes the columns sortable so we can easily see which CFPs deadlines are approaching.
It's a kind of a hack, because the dates are free text. Sorting it requires some regex parsing and such. It works, but it's kind of ugly.
This relates to #208. If we were using a fixed date format, we won't need any regex.