pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

RFC: better JSON structure for version switcher

Open drammock opened this issue 11 months ago • 1 comments

          > Another possibility is to keep it as a list-of-dicts, and have users optionally add a preferred=True item to one entry, and similarly an optional latest=True to one entry.

I'm not a huge fan on this as it easily leaves open the possibility of erroneously adding preferred and latest to more than one dict, and now you need some validation step if you want to make sure you haven't screwed up your JSON file. I'd rather just have one top -level value to update, which does not leave open that possibility, and is also simpler to automate. I'm not sure which is easier to implement but I have strong opinions about which one is more user-friendly.

Originally posted by @bryevdv in https://github.com/pydata/pydata-sphinx-theme/issues/945#issuecomment-1258766748

drammock avatar Jul 27 '23 16:07 drammock