Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: set modal dialog root view parent#10443

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
farfromrefug wants to merge7 commits intoNativeScript:main
base:main
Choose a base branch
Loading
fromAkylas:modal_root_parent

Conversation

farfromrefug
Copy link
Collaborator

now the dialog root view has theApplicationrootView as parent to be able to access thens-root class which comply with css specs (for example to read root css variables)

…le to access the `ns-root` class which comply with css specs (for example to read root css variables)
@cla-botcla-botbot added the cla: yes labelNov 16, 2023
on iOS as the UILayoutViewController can be used for other widget we need to let it know it is for modal so that it still loads/unloads the view (there was a test for parent).
@CatchABus
Copy link
Contributor

CatchABus commentedNov 16, 2023
edited
Loading

now the dialog root view has theApplicationrootView as parent to be able to access thens-root class which comply with css specs (for example to read root css variables)

I think it's more like a feature than a fix. Old docs state that you have to use.ns-modal for styling modal root view and children.
https://v6.docs.nativescript.org/ui/styling#root-views-css-classes

@farfromrefug
Copy link
CollaboratorAuthor

You still can. Ns-modal only apply to modals
But without that PR you can't access root CSS variables from a modal CSS. Which you would expect ( I think). I mean the rootview of application also is the root view for modals, bottom sheet...

@CatchABus
Copy link
Contributor

CatchABus commentedNov 16, 2023
edited
Loading

You still can. Ns-modal only apply to modals But without that PR you can't access root CSS variables from a modal CSS. Which you would expect ( I think). I mean the rootview of application also is the root view for modals, bottom sheet...

I see your point but will this implementation work for the case when root view is a Frame? That class seems to have a special handling foreachChildView and it might be a problem:https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/frame/frame-common.ts#L538

UPDATED: The same applies to other views that can be used as root views.

@farfromrefug
Copy link
CollaboratorAuthor

@vallemar yes it does. But not when you start modifying them from yes. From what you have root and modal properties are actually not the same

vallemar reacted with thumbs up emoji

@farfromrefug
Copy link
CollaboratorAuthor

@CatchABus it should not change anything. EachChild and parent are decoupled. Setting the parent does not imply it will be in eachChild. It won't !

CatchABus reacted with thumbs up emoji

CatchABus
CatchABus previously approved these changesNov 16, 2023
@NathanWalkerNathanWalker added this to the8.8 milestoneJun 28, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@CatchABusCatchABusCatchABus left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
9.0
Development

Successfully merging this pull request may close these issues.

4 participants
@farfromrefug@CatchABus@vallemar@NathanWalker

[8]ページ先頭

©2009-2025 Movatter.jp