-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Settings: design for Date Format
and Time Format
site settings
#10441
Comments
Date Format
and Time Format
Date Format
and Time Format
site settings
Here is an idea for the setting. It uses straightforward radios, but note that there are no inline input fields like wp-admin for custom format options – It’s hidden by default to avoid visual clutter for the majority of our users who likely to pick other options. The examples in the options are real time based on the site timezone like wp-admin. When you choose “Custom”, each displays an input form with SelectDropdowns that add Tokens when you select a format. Much like SEO settings for Business plan users. You can create a custom format by selecting a format you want to use in the order you want to display. Once a token is in the field, you can see the preview below. SelectDropdowns are limited to common ones, but since it’s an input field, you can also input directly characters such as commas and colons, even the less common ones such as “T” (Timezone abbreviation) to achieve parity with wp-admin. (Below is just an example, and you don't need to add all 4 of them.) |
Uh! Nice ones @iamtakashi! A week ago or so I've started working on the code-side of this: #10400 |
|
nice @Copons. |
@Copons, |
@retrofox, |
I guess so. I mean to native elements to those elements that are natively supported by the device. The browser in this case. So what I suggest is, if it worth, switch the selectors depending on the width of the viewport or the device ... or simply implement the selectors using the native ones. Make sense? |
Yes ... |
@retrofox @iamtakashi No worries! I pretty much picked this from the wp-admin parity list without telling anyone. 😄 I guess I could continue working on it, since the "tokenized" approach looks quite like the one used for the SEO title structure, and I know who to bug if I need help on them. Either way, the main struggle is converting between PHP and Moment.js formats. |
@retrofox Thanks for clarifying. I've looked #5231. Although the number of options are much less than language or timezone settings discussed there, it makes sense to go for the device native one all viewport size for this setting too. It looks like we can style it at least its face, so I'm ok with it. |
Great discussion here. My only comment at this stage would be to avoid having all of this inside the same "General" settings page, but having a button / link / |
@folletto That makes sense. I'd say I could group all date and time settings in a linkable card right below "Language". That opens a sub-page like this: In fact, it could even be a full fledged "Locale" sub-page that includes the Language option too, but I'd argue that Language is a much more important setting that should stay in the most prominent position possible. |
Side question: do we have a way to scroll the page to a specific card? In other words, can we position a specific section of this page when the user comes from a link? Similar way when the link has |
@retrofox I'm not exactly sure, since I guess React components aren't loaded yet when the browser tries to jump to an # anchor. We could maybe scroll to an element after its mount? If instead you're talking specifically about settings sub-pages, such as the taxonomies ones and the proposed date/time one, there is already a system in place doing that (see: |
After some days of working on this I've noticed a couple of things that I believe should be tackled in a follow up PR to avoid over-bloating the initial one (that will then stick to a carbon-copy parity between WP Admin and Calypso):
In both case, a short-ish and manageable-ish PR would instead become daunting. EDIT: rebasing, I've noticed that |
@Copons I'm sorry for the delay to answer. |
@retrofox Oh no, not at all! |
I'm also confused what's been proposed here. Anyway, I strongly feel that we should avoid a carbon copy of the setting in wp-admin since the custom format setting feels like only for programmers, and difficult to use for the majority of our users. I'm not saying my idea is perfect, and there might be a better idea, but we should avoid a carbon copy parity for the setting. |
As soon as I post the previous comment I saw the clarification :/ It looks like we've misinterpreted the suggestion. Thanks for clarifying @Copons. |
I believe I'm explaining poorly. Step 1: carbon copy (pretty much what I have already done anyway) Ah! Damn simultaneous comments! 😄 |
Adding a suggestion that I user submitted at 3025440-t to display UTC + City together in dropdown. |
I stumbled on this while checking my site settings and the amount of vertical space we are taking for seldomly used settings doesn't seem great. I don't think it warrants its own page, but what about combining all these under a segmented control navigation? |
@mtias Date/time/week sub-page is pretty much ready to go (and I'd say it could also include the Timezone setting in a future PR) 🙂 Also, it's almost essential to introduce the date/time format "tokenization", since I need to add a lot of new stuff and doing so in |
I see, so this was being worked on separately twice? |
@mtias What do you mean? This said, nothing stops us to add the segmented control to the sub-page. |
Is this related to work in #11316? |
@lancewillett Nope, while this internally uses the locale settings for preview purposes, it only takes care of the date/time formats used in themes. |
We can set these parameters using
/wp-admin
into the settings page - general options (/wp-admin/options-general.php)So the idea is to be able to set these values from Calypso. I guess that it should be placed next to
timezone
settings:This is the link to get this section:
http://calypso.localhost:3000/settings/general/$site
So the first thing that we need is a nice design :-D
cc @iamtakashi
The text was updated successfully, but these errors were encountered: