-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Simplify address.direction
#1228
Comments
The proposed signature confuses me a bit: |
Yeah, good point! How about |
Both are better, lets discuss more on team meeting |
That's correct. But I guess more predictable. And unlikely someone would do it anyway. So we have the following proposals on the table, just to summarise: direction ({ abbr?: boolean, type?: DirectionType | DirectionType[] })
direction ({ abbr?: boolean, types?: DirectionType[] })
direction ({ abbr?: boolean, type?: DirectionType, except?: DirectionType[]}) I think I like the first most. |
Team decision Refactor our locales to match these: interface Directions {
cardinal: string[]
ordinal: string[]
} Merge the directions functions into a single method: direction ({ abbr?: boolean = false, type?: DirectionType | DirectionType[] = ['cardinal', 'ordinal'] }) Throw if |
Hello, I can take care of this one, please assign it to me |
We already discussed this with @hankucz and she will look at it. Thank you @wael-fadlallah |
Yeah, I'm already looking into it |
I'm closing this as #2476 provides the suggested change. If you think this is a mistake, please reopen the issue or create a new one with additional, related information. |
Clear and concise description of the problem
There are 3 separate functions now
direction
,cardinalDirection
andordinalDirection
, which is not convenience to use. Also they depend on specific order of localisation, which is hard to verify when reviewing PR.Suggested solution
Should we change the definition to look more like:
And then both
directions
anddirections_abbr
should use this type?Additionally, I think it makes sense to simplify the usage and change
direction
signature to:And then deprecate the other methods?
Alternative
We might also skip
secondaryIntercardinal
...Additional context
No response
The text was updated successfully, but these errors were encountered: