Skip to content
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

[WIP] Dialog setting #2032

Closed
wants to merge 65 commits into from
Closed

Conversation

panaC
Copy link
Member

@panaC panaC commented Oct 26, 2023

No description provided.

@panaC panaC marked this pull request as draft October 26, 2023 15:15
@panaC panaC changed the base branch from develop to arthur/ui/dialog October 26, 2023 15:16
@socket-security
Copy link

socket-security bot commented Oct 26, 2023

</>
);
}
interface AvailableLanguages {
Copy link
Member Author

Choose a reason for hiding this comment

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

duplicate from

export const AvailableLanguages = {


const SelectItem = React.forwardRef(({ children, ...props }: any, forwardedRef) => {
return (
<Select.Item {...props} id="itemInner" ref={forwardedRef}
Copy link
Member Author

Choose a reason for hiding this comment

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

You don't need to forwardRef a sub-component at the top of the tree

@@ -36,10 +43,48 @@ class Settings extends React.Component<IProps, undefined> {
<LibraryLayout
title={__("header.settings")}
>
Copy link
Member Author

Choose a reason for hiding this comment

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

This component is loaded from react-router

"/settings": {
path: "/settings",
// exact: false,
component: Settings,
} as Route,

I think that the react-router route /setting should be disable (the setting component is no longer a page but a modal dialog now). And Setting Dialog must be move to the common/components/dialog folder (used in library and reader as well)

Copy link
Member

Choose a reason for hiding this comment

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

I think that the react-router route /setting should be disable (the setting component is no longer a page but a modal dialog now).

Nested routes (i.e. relative settings_modal path inside another route definition) would work well declaratively, for example /bookshelf + nested /bookshelf/settings_modal ... but the settings modal popup dialog with Radix is really designed to be displayed anywhere (overlaid on top of an existing route component) where a "call site" button (trigger UI control) can be placed, so I agree that using the router to implement this is a waste of time and effort (unless we really want to use router functionality, for example to open the settings dialog in a specific tab by passing route parameters?)

@panaC
Copy link
Member Author

panaC commented Nov 23, 2023

replaced by #2039

@panaC panaC closed this Nov 23, 2023
@danielweck danielweck deleted the arthur/ui/settings-dialog branch April 25, 2024 09:54
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.

4 participants