-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature excel enable multiple templates #592
base: main
Are you sure you want to change the base?
Conversation
Adapted SelectedColumnState to contain multiple Columns
Enables the insertion of multiple templates at once |
To do: |
src/Client/MainComponents/Widgets.fs
Outdated
let content = | ||
let switchContent = if model.ProtocolState.TemplateSelected.IsNone then selectContent() else insertContent() | ||
let switchContent = | ||
if model.ProtocolState.TemplatesSelected.Length > 0 && model.PageState.SidebarPage = Routing.SidebarPage.Protocol then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model.PageState.SidebarPage = Routing.SidebarPage.Protocol
we are still in the widget? Why check for sidebar pagestate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, the view for the protocolsearch is left immediately, when a single template is added, without the possibility to add additional templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you must adjust the Msg that triggers this.
Model.PageState.SidebarPage = Routing.SidebarPage.Protocol | ||
} | ||
state, Cmd.ofMsg (UpdateModel nextModel) | ||
| AddProtocol prot -> | ||
log "AddProtocol" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/Client/Views/SidebarView.fs
Outdated
JsonExporter.Core.FileExporter.Main(model, dispatch) | ||
|
||
| {SidebarPage = Routing.SidebarPage.ProtocolSearch } -> | ||
| {WidgetTypes = Routing.WidgetTypes.ProtocolSearch } -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only remove this one as PageState. Instead track this view with a inner flag in ProtocolState
@@ -70,7 +70,7 @@ module Protocol = | |||
let nextState = { | |||
state with | |||
TemplatesSelected = templates | |||
WidgetTypes = Routing.WidgetTypes.ProtocolSearch | |||
IsProtocolSearch = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not required, correct? As you would already be on the search screen? Remove it if it is not necessary to allow reusing this Msg in different logic approaches without switching to search view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/Client/Views/SidebarView.fs
Outdated
| {WidgetTypes = Routing.WidgetTypes.TermSearch } -> | ||
TermSearch.Main (model, dispatch) | ||
if model.ProtocolState.IsProtocolSearch then | ||
Protocol.SearchContainer.Main model dispatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this if-else logic into the protocol view logic, do not handle this in sidebarview anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Closses #499