Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

reduce public header code for shared color type - #6763

Closed
incanus wants to merge 1 commit into
masterfrom
merge-ios-macos-color-defs
Closed

incanus wants to merge 1 commit into
masterfrom
merge-ios-macos-color-defs

Conversation

@incanus

@incanus incanus commented Oct 19, 2016 •

Copy link
Copy Markdown
Contributor

I don't feel super strongly about this, but we could cut down some public API code by merging things like this, leveraging the work in #6637.

Similarly, we could do the same for UIEdgeInsets and NSEdgeInsets. Speaking of, we call it MGLEdgeInsetsFromNSEdgeInsets on both platforms despite taking a UIEdgeInsets argument on iOS.

/cc @1ec5 @friedbunny

@incanus incanus added iOS Mapbox Maps SDK for iOS refactor macOS Mapbox Maps SDK for macOS runtime styling labels Oct 19, 2016
@incanus incanus added this to the ios-v3.4.0 milestone Oct 19, 2016
@incanus incanus self-assigned this Oct 19, 2016
@mention-bot

Copy link
Copy Markdown

@incanus, thanks for your PR! By analyzing the history of the files in this pull request, we identified @1ec5, @frederoni and @yhahn to be potential reviewers.

@1ec5

1ec5 commented Oct 19, 2016

Copy link
Copy Markdown
Contributor

This is generated code, so your changes will be wiped out the next time someone runs make style-code-darwin.

I guess I don’t see a downside to having the declarations duplicated, since it’s all generated code. Whether using jazzy, Quick Help, or Jump to Definition, everyone sees the most specific content for their platform.

@1ec5

1ec5 commented Oct 19, 2016

Copy link
Copy Markdown
Contributor

Speaking of, we call it MGLEdgeInsetsFromNSEdgeInsets on both platforms despite taking a UIEdgeInsets argument on iOS.

Yeah, that’s been bugging me too. Care to fix that?

@incanus

incanus commented Oct 19, 2016

Copy link
Copy Markdown
Contributor Author

This is generated code, so your changes will be wiped out

Ah right, good point.

I guess I don’t see a downside to having the declarations duplicated, since it’s all generated code.

Just to get rid of ifdef's in headers? Like I said, not a huge deal, but it seems odd to declare the new MGLColor now but then still branch some public code to handle both UIColor and NSColor.

@1ec5

1ec5 commented Oct 19, 2016

Copy link
Copy Markdown
Contributor

Just to get rid of ifdef's in headers? Like I said, not a huge deal, but it seems odd to declare the new MGLColor now but then still branch some public code to handle both UIColor and NSColor.

We did this to avoid having Quick Help and jazzy say “MGLColor” and not know how to link it: #6168 (comment).

@incanus

incanus commented Oct 19, 2016

Copy link
Copy Markdown
Contributor Author

We did this to avoid having Quick Help and jazzy say “MGLColor” and not know how to link it

Ah, ok, let's scrap the original intent here then.

What say I repurpose for the MGLEdgeInsetsFromNSEdgeInsets problem then? That's all private usage so it's a non-breaking change.

@1ec5

1ec5 commented Oct 20, 2016

Copy link
Copy Markdown
Contributor

Sure, or even rename it to MGLEdgeInsetsFromObjCEdgeInsets. 😉

@boundsj boundsj modified the milestones: ios-3.4.1, ios-v3.4.0 Oct 30, 2016
@1ec5

1ec5 commented Jan 9, 2017

Copy link
Copy Markdown
Contributor

Flipping CGVector for macOS has made conditional compilation unavoidable in these headers: #7636.

@1ec5

1ec5 commented Jan 24, 2017

Copy link
Copy Markdown
Contributor

Stale.

@1ec5 1ec5 closed this Jan 24, 2017
@jfirebaugh
jfirebaugh deleted the merge-ios-macos-color-defs branch May 11, 2017 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS refactor runtime styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants