Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement design for Releases category #38

Closed
2 tasks done
coreymckrill opened this issue Sep 30, 2021 · 6 comments
Closed
2 tasks done

Implement design for Releases category #38

coreymckrill opened this issue Sep 30, 2021 · 6 comments
Assignees

Comments

@coreymckrill
Copy link
Contributor

coreymckrill commented Sep 30, 2021

releases

I'm not sure this one will be possible using block templates. The majority of the posts in this category don't have any meta data (taxonomy term, etc.) to identify which version it relates to; just the version number as part of the post title. So we'll either need to add a taxonomy or post meta value for the version, or write some regex to try and scrape it from the post title. Either way, we'll probably need a PHP template in order to output the markup accurately.

And then there are a few posts that aren't actually about a WP release (like this one). Not sure how to present those...

@iandunn
Copy link
Member

iandunn commented Sep 30, 2021

🤔

I'm generally leery of using regex -- ("...now you have two problems") -- but I also think it'd be impractical to retroactively apply terms for a new taxonomy, and also impractical to expect authors to use the taxonomy in the future.

I wonder if a really simple regex like \d(\.\d)+ would be good enough?

https://regex101.com/r/iKnTvJ/1

If that doesn't match anything, then a second regex could search for {number}{ordinal} ( psuedoregex 😉 )

...and if that fails, then maybe we leave the space blank? It's probably not worth the time/tech debt to get the last 5% of them.

@iandunn
Copy link
Member

iandunn commented Sep 30, 2021

That regex could be used to retroactively apply a taxonomy term, but we'd still have the problem of folks having to know that they need to use it.

@iandunn
Copy link
Member

iandunn commented Sep 30, 2021

Another idea would be to add that "version number" area part of post content, so it's obvious to folks that they need to add it? Placeholder text could give instructions.

But then it'd have to be hidden on the single post view. Maybe we could add it in the editor as an inline panel, so that the editor would appear more like the category view. but instead of saving to post_content, it'd save as a taxonomy term. That seems like way too much trouble for something like this, though.

@coreymckrill
Copy link
Contributor Author

Here's a slightly more complex expression (\d{0,3}(\.\d{1,3})+) that gets all but 12 of the post titles in the archive:

https://regex101.com/r/NgC94E/1

For those 12, most of which are the oldest posts, we could probably just leave it blank.

@iandunn
Copy link
Member

iandunn commented Oct 1, 2021

That looks good 👍🏻

@iandunn
Copy link
Member

iandunn commented Nov 10, 2021

I don't think there's a good way to implement the version number stuff right now; it'd be better to do that in #75 once dynamic templates are available.

The rest of the design can still be implemented in this issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants