-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add YoHours button to recurring schedule fields #9678
base: develop
Are you sure you want to change the base?
Conversation
Fields that accept opening_hours syntax are now standard text fields with the addition of a button that links out to YoHours. The user can use this button to compose a value or visualize an existing value.
I like the idea of having this as a step towards better UI inside iD! A few things I notices:
|
uiFieldText as uiFieldTel, | ||
uiFieldText as uiFieldUrl, | ||
likelyRawNumberFormat | ||
}; | ||
|
||
const likelyRawNumberFormat = /^-?(0\.\d*|\d*\.\d{0,2}(\d{4,})?|\d{4,}\.\d{3})$/; | ||
const yoHoursURLFormat = 'https://projets.pavie.info/yohours/?oh={value}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spellcheck action on GitHub Actions doesn’t like this URL because French words sometimes look like misspelled English words. 😉
@@ -18,12 +18,14 @@ export { | |||
uiFieldText as uiFieldEmail, | |||
uiFieldText as uiFieldIdentifier, | |||
uiFieldText as uiFieldNumber, | |||
uiFieldText as uiFieldSchedule, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it would be nice to keep the dropdown button for some common values like 24/7
that YoHours doesn’t support. But the combo field doesn’t support an external link button as far as I know.
I guess this would be feedback for @PanierAvide. I’m not sure if the YoHours website itself has an issue tracker, but there is one for the jQuery widget that’s embedded in it.
There is an iframe version of YoHours intended to be embedded inside a Web application like iD: #974 (comment). However, I didn’t use it here because embedding it into a rather space-constrained part of iD would be more difficult than simply linking out, and there’s no precedent for opening modals from the inspector. |
Fields that accept opening_hours syntax are now standard text fields with the addition of a button that links out to YoHours. The user can use this button to compose a value or visualize an existing value, or they can compose the value manually as before.
Depends on ideditor/schema-builder#101. Itty-bitty baby steps toward #974.