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

Enable selection of terms to import into excel #584

Merged

Conversation

Etschbeijer
Copy link
Collaborator

@Etschbeijer Etschbeijer commented Nov 27, 2024

Closes Issue #425

@Etschbeijer Etschbeijer marked this pull request as ready for review November 29, 2024 10:40
@Etschbeijer Etschbeijer self-assigned this Dec 3, 2024
@Etschbeijer
Copy link
Collaborator Author

grafik
Base view of template select

@Etschbeijer
Copy link
Collaborator Author

grafik
Select template view

@Etschbeijer
Copy link
Collaborator Author

grafik
Selected template view

@Etschbeijer
Copy link
Collaborator Author

grafik

@Etschbeijer
Copy link
Collaborator Author

grafik

@Etschbeijer
Copy link
Collaborator Author

grafik

@Etschbeijer
Copy link
Collaborator Author

grafik

Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,104 @@
namespace Modals.Template
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the only file in this exact namespace. Not required therefore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -1,77 +1,24 @@
namespace Modals
namespace Modals.Import
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the only file in this exact namespace. Not required therefore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

prop.children children
]

static member toProtocolSearchElement (model: Model) dispatch =
Copy link
Collaborator

Choose a reason for hiding this comment

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

elements PascalCase

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

]

[<ReactComponent>]
static member displaySelectedProtocolElements (model: Model, selectionInformation: SelectedColumns, setSelectedColumns: SelectedColumns -> unit, dispatch, ?hasIcon: bool) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

elements PascalCase

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

prop.text (string targetselector)
]

static member RadioPluginsBox(boxName, icon, importType: TableJoinOptions, radioData: (TableJoinOptions * string)[], setImportType: TableJoinOptions -> unit) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is way to specialized to be in this namespace

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

]
])

static member checkBox(columns: CompositeColumn [], index, selectionInformation: SelectedColumns, setSelectedColumns: SelectedColumns -> unit) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is way to specialized to be in this namespace and the name is too broad for what it does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

]
]

static member TableWithImportColumnCheckboxes(table: ArcTable, ?selectionInformation: SelectedColumns, ?setSelectedColumns: SelectedColumns -> unit) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Too specialized to be in this namespace

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,183 @@
module Modals.ModalElements
Copy link
Collaborator

Choose a reason for hiding this comment

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

namespace Modals
...

type ModalElements =

...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

This will never leave frontend, don't call it DTO and put it in Shared

Copy link
Collaborator

Choose a reason for hiding this comment

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

Correct me if i am wrong with the first assumption

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -14,6 +14,20 @@ open Fable.React.Helpers

type ModalElements =

static member LogicContainer (children: ReactElement list) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to GenericComponents.fs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that i think about it. Why do you need this in a modal? this should only be used for sidebar logic groups?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I grouped all elements that were used by SeletiveTemplateFromDB.fs and SelectiveImporModal.fs into the ModalElements.fs.
Origininally I rebuild the whole template selection as a modal but have undone it.

@@ -1,4 +1,4 @@
module Shared.DTOs.SelectedColumnsModalDto
module SelectedColumns
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not a state either. Move to specific module in Types.fs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@Freymaurer
Copy link
Collaborator

This seems like a ui issue:

image

is this horizontally scrollable?

image

@Etschbeijer
Copy link
Collaborator Author

This seems like a ui issue:

image

is this horizontally scrollable?

image

It is, when you click on it, the scrollbar appears:
grafik

Html.div [
prop.style [style.maxHeight (length.px 350); style.overflow.auto]
prop.children [
Protocol.TemplateFromDB.displaySelectedProtocolEle model dispatch
SidebarComponents.SidebarLayout.LogicContainer [
Copy link
Collaborator

Choose a reason for hiding this comment

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

No LogicContainers in Widgets :'D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@Freymaurer Freymaurer merged commit 8396611 into main Dec 16, 2024
2 checks passed
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