Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Pick action doesn't properly open included view #1046 #1055

Closed
wants to merge 1 commit into from
Closed

Conversation

wiadev
Copy link
Contributor

@wiadev wiadev commented Jul 19, 2017

@teosarca teosarca self-assigned this Jul 19, 2017
@@ -186,7 +186,9 @@ class DocumentList extends Component {
this.setState({
cachedSelection: null
}, () => {
dispatch(setListIncludedView());
if (includedView.windowType === 'pickingSlot') {
Copy link
Member

Choose a reason for hiding this comment

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

@wiadev hmmm... not sure this one because 'pickingSlot' it's just one of the many windowTypes.
IMHO it shall work no matter which is the windowType.
If the process/action returned that "an included view shall be opened" then it shall be opened no matter what.

Btw, might be that i am not understanding the underlying problem from here. Pls feel free to discuss about that on chat or even voice call (preferable for me because it's faster).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@teosarca
Yes, this piece of code looks very weird.

Please let me explain.

  1. Before my changes this line was intended to reload includedView contents when user clicks on another product line (on left side).
  2. But when we added overriding includedView upon click on "Select HU" action we've get triggering of this method call when we actually just replacing the includedView with a new one.
  3. So your assumption - "an included view shall be opened" then it shall be opened no matter what" is valid and it will work in the same way. The only exception - pickingSlot window, which has a bit different data flow and needs to clear contents (see line 189 before my changes) and then load new list of slots.

In fact this is workaround to avoid more massive changes in DocumentList.

Copy link
Member

Choose a reason for hiding this comment

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

@wiadev

about 3. I am a bit concerned about that. While the fix is solving our current problem (which is in Picking modal popup) it's not solving it generally. And that's also important for us because these features are basically our building blocks for more and more functionalities (like LEGO :) ).

I think we shall create a new task to refactor and do it right. On that task we shall also discuss about it, i can also give you more input. We don't have any pressure on that. The "high prio" of this task was exactly because we need to deliver the Picking window ASAP.
wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

but before i could integrate this task, pls check and fix following issue:

image

i.e. the quickActions endpoint is called using the previous windowId/viewId (i.e. the pickingSlot) instead of the current windowId/viewId (the HU).

Copy link
Contributor Author

@wiadev wiadev Jul 19, 2017

Choose a reason for hiding this comment

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

As I mentioned, this is workaround. But doing this right requires significant rework of DocumentList and potentially has wide impact, so we need to do this carefully.

Distinct task for that would be good.

Copy link
Member

Choose a reason for hiding this comment

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

=> #1057

Copy link
Member

Choose a reason for hiding this comment

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

for the records: this PR was closed because the fix was provided on #1069

@wiadev wiadev closed this Jul 23, 2017
@teosarca teosarca deleted the dev-1046 branch July 27, 2017 11:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants