Skip to content

Support for theme colors and native Apple style appearance#4

Open
MLabs-code wants to merge 18 commits into
Roze-im:mainfrom
MLabs-code:main
Open

Support for theme colors and native Apple style appearance#4
MLabs-code wants to merge 18 commits into
Roze-im:mainfrom
MLabs-code:main

Conversation

@MLabs-code

Copy link
Copy Markdown
Contributor

Adjustments needed for appearance similar to native context menu

MLabs-code and others added 16 commits May 30, 2025 10:20
add overrideUserInterfaceStyle
overrideUserInterfaceStyle
 Changed to an adaptive blur style
Update to adaptive colors
wrong commit overrideUserInterfaceStyle
By default scale none
Separator height update likely to apple native
Font size like to apple natvie
change font size for likely apple native
change icon size to apple likely natvie menu
adjustments needed for appearance similar to native context menu
remove weak 
I initialize the view that I need to display only for that component. I don't use it statically for all messages in the conversation.
on the new window it is necessary to present the screen with emoji

@thibauddavid thibauddavid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR ! I added a few remarks on it, let's talk about it 👍

Comment thread Sources/ContextualMenu/ContextMenuInteractor.swift
}
}

func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More related to your project than this lib I think ?

animated flag: Bool,
completion: (() -> Void)? = nil)
{
ContextMenuInteractor.shared.present(viewControllerToPresent, animated: flag, completion: completion)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's relevant to add this on the library itself.

/// If your view conforms to `ContextMenuAnimatable`, then
/// provided animations will be used to show/hide view
weak var accessoryView: UIView?
let accessoryView: UIView?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the motivation behind this ?


public init(
transform: CGAffineTransform = .init(scaleX: 1.2, y: 1.2),
transform: CGAffineTransform = .identity,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native style does apply a transform I think.
However I agree that it isn't as big as it was when I implemented that library. What about reducing it (yeah, 1.2 is way too much on current iOS version) instead of removing it entirely ?

Comment thread Sources/ContextualMenu/Views/MenuView/MenuView.swift
BSC added 2 commits June 3, 2025 10:25
Example of a specific use
{
"identity" : "elegant-emoji-picker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Finalet/Elegant-Emoji-Picker",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a simple stackView inside a view with rounded borders would be enough as an example. We don't need to import a library for this

@thibauddavid

Copy link
Copy Markdown
Collaborator

Thanks for your changes. Can you remove the present method & call as suggested in my comments?
Also, any reason to have removed the weak var accessoryView: UIView? ?

@thibauddavid

Copy link
Copy Markdown
Collaborator

Hey, any news on this ?

@MLabs-code MLabs-code requested a review from thibauddavid June 10, 2025 11:48
@MLabs-code

Copy link
Copy Markdown
Contributor Author

Hey, any news on this ?

It's not clear to me what all you want me to remove.
Can you write it down for me in bullet points?
I feel like I've explained everything to you why I did it that way.

@thibauddavid

thibauddavid commented Jun 10, 2025

Copy link
Copy Markdown
Collaborator

Sure, it's written in above comments, but here is a synthesis:

  • What is the motivation behind this ?
    weak var accessoryView: UIView?
    let accessoryView: UIView?
  • This code should be removed from that library (it's related to your project)
    • ContextMenuInteractor:

func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil)

• UIView+Extensions 
public static func present(_ viewControllerToPresent: UIViewController,
                               animated flag: Bool,
                               completion: (() -> Void)? = nil)
  • previewView should keep a scaling transform as native does, but I agree it shouldn't be that much
            transform: CGAffineTransform = .init(scaleX: 1.2, y: 1.2),
            transform: CGAffineTransform = .identity,

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.

2 participants