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

Release/2.3.0 - WIP #219

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft

Release/2.3.0 - WIP #219

wants to merge 29 commits into from

Conversation

JJJ
Copy link
Contributor

@JJJ JJJ commented Jul 7, 2021

Draft PR for the 2.3.0 release.

JJJ added 29 commits July 7, 2021 14:11
This method leans on strtotime() internally to get the week number for "this Thursday" which is used by the ISO-8601 standard to define the week of the year.

This change is necessary to ensure that the proper week number is output to the user in admin-area calendar views.

Fixes #218.
This change swaps out colors for RGBA, allowing output to work with both light & dark themes.

It also rearranges some HTML elements to make them easier to style and degrade gracefully when themes do weird things. Specifically, it moves the H2 ahead of the form & pagination, allowing it to hover above both while also giving all inputs more room to work with.

Several related improvements are being made to calendar styling at the same time, specific to links, fonts, padding, margin, and hovers, allowing for Sugar Calendar to be a bit more strict about its output without worrying about themes overloading it unintentionally.
This change fixes a potential issue when deactivating an add-on but you still have another browser tab open with the unavailable settings screen open.
* Abstract sidebar promo feature even further for easier modifications in the future
* Add methods for sub/section validation, and use them for avoiding broken settings pages from being visible
* Avoid outputting whitespace where it may negatively impact presentation
* Move update notice into an action
* Cast return values of filters as needed
This commit prevents out-of-range and impossible dates from being requested via the UI.
This ensures that taxonomies such as Post Formats do not unintentionally appear in the navigation when using post-type-support.
This change ensures that the inner HTML of a time tag is properly translated to the user or site language.

It also updates some related inline code docs, and prevents double-escaping of data attribute values.

Fixes #251.
Use wp_parse_args() instead of touching each key directly, and don't echo empty values.
* Events: introduce sugar_calendar_get_events_list() function.
* Events: clean Event list caches on "save_post" action.
* Events: update sc_get_events_list().
* Time: introduce sugar_calendar_round_time().
* Time: update return value docs.
* Events: updates to sugar_calendar_get_events_list().
* Events: prefer "timezone" over "tz" in arguments.
* Events: prefer "start_of_week" over "sow" in args.

----

This new function is tasked with compiling a list of Events by number, including recurring sequence IDs.

In addition, sugar_calendar_clean_events_list_cache() is being introduced to help with cleaning the cache that this new function relies on to be less-slow.

This change ensures that relevant Event list caches are cleaned whenever a relative Post type that supports "events" is saved.

This change uses the new "sugar_calendar_get_events_list()" function to compile a list of Events, including recurring sequences, in the proper order and number requested by the parameters.

This new function is used to round a timestamp up or down to any nearest interval.

It is being abstracted from inside of the new sugar_calendar_get_events_list() function.

This change uses the new sugar_calendar_round_time() function to ensure that lists are auto-expired at specificied intervals, which allows for certain display parameters like "in-progress" to have some boundary to measure their results by.

By default, 15 minute (900 second) intervals are used, and a 100 year spread is used in both directions to limit recurring results by.
(Also normalize the legacy functions that make use of it.)

This change allows for caller functions to pass in the number of days ahead that Events should be queried for.

Each caller now has a $days_in_view variable responsible for communicating that into sc_get_events_for_calendar(), and also for the number of iterations to loop/draw days in the calendar (taking inspiration from sc_draw_calendar()).

While I'm in here changing things, I've also normalized inline docs to current standards and corrected some copy/paste errors between the callers.

Props WRasada 🙏
This change ensures that $qr is always defined, avoiding PHP notices, and uses get_post_types_by_support() to include all supported types.

Props jivedig.
This change adds a "cache_prefix" argument, to allow for easier purging, separation of duties, and third-party usage.

It also adds a few more PHP notice/error avoidance measures with inline documentation to explain what it's avoiding.
This change ensures that an array is always returned instead of `false` or any other unintended type.
* Events: introduce sugar_calendar_is_display_type().
* Events: use sugar_calendar_is_display_type() where appropriate.
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

Successfully merging this pull request may close these issues.

1 participant