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

Honor tab stale flag also when editing in advanced mode #769

Closed
teosarca opened this issue May 20, 2017 · 7 comments
Closed

Honor tab stale flag also when editing in advanced mode #769

teosarca opened this issue May 20, 2017 · 7 comments

Comments

@teosarca
Copy link
Member

Type of issue

Bug

Current behavior

While editing/patching a document, as a response we can also stale some of the included tabs.
When editing in advanced mode, this property is not considered => NOK
When editing in normal mode, everything works ok.

Expected behavior

stale tabs property shall always be honored.

Steps to reproduce

Atm, i can do it only in development, but in future this would happen when you tick/untick the Active flag.

image

@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented May 22, 2017

@teosarca Yeah, it was implemented already, but i see that it was flagged as a bug, and you wanted to disable the updates of tabs when modals are edited (#704).

Should we revert it?

Maybe would you mind to create a list of accepted cases of loading includedTabsInfo, and then we could be able to create condition for that.

@teosarca
Copy link
Member Author

Hi @damianprzygodzki ,

Ideally would be to flag the tab(s) as stale.
As soon as user gets out of advanced edit, the frontend shall refresh the tabs which were marked as stale.

About #704 ,
i wasn't aware that those tabs were refreshed because one of the previous endpoint response marked them as stale.
If that's the case, pls always honor the "stable" request.

So for now, let's do it as described and if it's a quick win, also pls implement the "ideally" case.

wdyt?

@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented May 22, 2017

Sorry, i can't understand the solution. Let me clarify.

We have two ways of updating the tabs:

  1. When response from PATCH comes, we are updating tabs that are in includedTabsInfo property.
  2. When information about queryOnActive comes in layout of window (that is a constant for time of window component life) and tab was activated.

Ideally would be to flag the tab(s) as stale.

We have no way to flag tab as stale (includedTabsInfo brings updates, queryOnActivate is defined in layout)

As soon as user gets out of advanced edit, the frontend shall refresh the tabs which were marked as stale.

Advanced edit basically has no event on closing itself, because it is just a regular window. We can add it and refresh 'stale tabs' (i am thinking these ones with property queryOnActivate set in layout already), but would it be only when the advancedEdit flag is set? Will it be there some other cases to refresh tabs on modal closing?

If that's the case, pls always honor the "stable" request.

What is 'stable' request?

EDIT
#540 We exchanged staleTabIds to includedTabsInfo. Every tab that has stale property there is updated.

@teosarca
Copy link
Member Author

What is 'stable' request?

ahh sorry, typo, let's me rephrase it: in case frontend gets stale:true for a given tab it shall always be honored.

@damianprzygodzki
Copy link
Contributor

So, correct me if i am wrong, the solution here is:

@damianprzygodzki
Copy link
Contributor

As discussed on skype:

  • if patch is in modal, fetch stale:true tabs on modal closing
  • if not leave it as it is now (fetch staled tabs after patch response)

damianprzygodzki added a commit that referenced this issue May 22, 2017
damianprzygodzki added a commit that referenced this issue May 22, 2017
@metas-lc metas-lc self-assigned this May 22, 2017
@metas-lc
Copy link

IT

  1. go in a window which has multiple included tabs (e.g. Product 140)
  2. go to advance edit and change something there (e.g. is Active)
    => in inspect, notice that the tabs were not fetched OK
  3. press on done
    => in inspect see that tabs are fetched (7 in my case) OK

metas-ts added a commit to metasfresh/metasfresh that referenced this issue May 25, 2017
[#409](metasfresh/metasfresh-webui-api-legacy#409) backend: change view attributes endpoint location
[#1639](#1635) cannot complete distribution order
[#760](metasfresh/metasfresh-webui-frontend-legacy#760) Fix the texts displayed while loading
[#787](metasfresh/metasfresh-webui-frontend-legacy#787) window endpoint: change "attribute" to "field"
 [#763](metasfresh/metasfresh-webui-frontend-legacy#763) grid: right click on a cell and zoom into
 * [#1617](#1617) Check if imported esr file is v11 file
* [#1615](#1615) Address lines is cut off on shipment jasper document
* [#1591](#1591) Password Field is missing in user window in WebUI
* [#1586](#1586) New Window for OrgType in WebUI
* [#1584](#1584) New Window for Org in WebUI
* [#1585](#1585) New Window Client in WebUI
* [#762](metasfresh/metasfresh-webui-frontend-legacy#762) Empty Filter vs. Default Value in Window Filtering
* [#778](metasfresh/metasfresh-webui-frontend-legacy#778) Yellow pulse effect w/o data change
* [#407](metasfresh/metasfresh-webui-api-legacy#407) View filtering by virtual SQL column not working
* [#412](metasfresh/metasfresh-webui-api-legacy#412) Provide API for sorting included tab
* [#411](metasfresh/metasfresh-webui-api-legacy#411) Provide "size" to layout element
* [#396](metasfresh/metasfresh-webui-api-legacy#396) Vendor Return Actions in WebUI
* [#772](metasfresh/metasfresh-webui-frontend-legacy#772) automatic Column sizing not showing all text although space would be available
* [#774](metasfresh/metasfresh-webui-frontend-legacy#774) Fix invalid "GET /window/{windowId}/{tabId} call
* [#764](metasfresh/metasfresh-webui-frontend-legacy#764) Long text boxes shall have a border around
* [#769](metasfresh/metasfresh-webui-frontend-legacy#769) Honor tab stale flag also when editing in advanced mode
* [#767](metasfresh/metasfresh-webui-frontend-legacy#767) Got same notification several times
^* [#766](metasfresh/metasfresh-webui-frontend-legacy#766) issue panel doesn't open
* [#765](metasfresh/metasfresh-webui-frontend-legacy#765) Date + Time Info in Notification window
[#378](metasfresh/metasfresh-webui-api-legacy#378) Document changes: provide the validStatus and saveStatus only when changed
* [#405](metasfresh/metasfresh-webui-api-legacy#405) Backend shall provide JSON document fields indexed by field's name
* [#1560](#1560) Add description fields to invoice window
* [#1577](#1577) Introduce /test/ping/notifications server troubleshooting endpoint

me-45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants