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

Define refactoring plan for filters model #948

Closed
teosarca opened this issue Jun 27, 2017 · 10 comments
Closed

Define refactoring plan for filters model #948

teosarca opened this issue Jun 27, 2017 · 10 comments

Comments

@teosarca
Copy link
Member

teosarca commented Jun 27, 2017

Current behavior

Reading the comment from #864 (comment) it seems the filters model is broken.

Expected behavior

Define precisely what's broken and elaborate a plan to refactor/fix that.

For now, this task is about identifying the "filters model" issues and gaps and finding a plan to fix it.

@teosarca teosarca added this to the 2017-27 milestone Jun 27, 2017
@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented Jun 27, 2017

  1. Static filters are delivered without layout. At least type of filter is part of layouting, not the data. For now method for rendering and sortin the filters uses data also to render filters. NOK.
    1.1 Additionally, filters rendered normally from layouts are generated from array. Another hardcoded difference in protocol.
  2. Filters used to be allowed to be active one at a time. If there are static filters (together with others), they are served like mixed types in one array. NOK. View flickering, the static filters disappear, inconsistent inputs with state.
  3. Sometimes when using the filters with static filters applied, the active filter model seems corrupted.

screen shot 2017-06-27 at 09 32 48

4. The one and only purpose data for filters is to iterate over, and find data for rendered component by layout (as in whole application). We cannot iterate over the data and render things.

And after all, i believe it is not a metasfresh/metasfresh-webui-frontend issue. It should be created in API repository.

@cadavre
Copy link
Contributor

cadavre commented Jun 27, 2017

Plan:

  1. Move away static=true filters from filters array in data response.
  2. Bring "static filters" as separate component and move its info into data response array property called ?. @damianprzygodzki please provide a name. ;)
  3. On clearing "static filter" – call API endpoint to recreate view disconnected from "static filter".

@damianprzygodzki
Copy link
Contributor

GET /rest/api/documentView/{windowId}/{viewId}

{
  filters: [],
  firstRow: 0,
  ...,
  staticFilters: [
    {
      caption: "",
      id: ""
    },...
  ]
}

DELETE /rest/api/documentView/{windowId}/{viewId}/staticFilter/{staticFilterId}

{
  windowId: "",
  viewId: ""
}

@teosarca
Copy link
Member Author

NOTE, i've changed the backend as described in the post above. It will be available on next rollout.

IMPORTANT: For the time being i am also providing the static filter as I did before (i.e. in the "filters" list, flagged with static:true). That part will be removed completely after this task will be implemented.

@cadavre cadavre modified the milestones: 2017-28, 2017-27 Jun 30, 2017
@cadavre cadavre removed their assignment Jul 4, 2017
@Dunkat Dunkat self-assigned this Jul 4, 2017
@Dunkat
Copy link
Contributor

Dunkat commented Jul 5, 2017

@teosarca when I'm trying delete static filter, I am getting in respone two static filters, please have a look:

image

@teosarca
Copy link
Member Author

teosarca commented Jul 5, 2017

will check

Dunkat added a commit that referenced this issue Jul 5, 2017
Dunkat added a commit that referenced this issue Jul 5, 2017
Dunkat added a commit that referenced this issue Jul 5, 2017
cadavre added a commit that referenced this issue Jul 10, 2017
Define refactoring plan for filters model #948
@teosarca
Copy link
Member Author

rolled to w101

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Jul 14, 2017
[#998](metasfresh/metasfresh-webui-frontend-legacy#998) Picking: quick actions button not shown
[#992](metasfresh/metasfresh-webui-frontend-legacy#992) Disable quick action dropdown button while running the action
[#498](metasfresh/metasfresh-webui-api-legacy#498) Return HUs to Customer action is not working
[#1010](metasfresh/metasfresh-webui-frontend-legacy#1010) Action menu Window Name
[#978](metasfresh/metasfresh-webui-frontend-legacy#978) Make Avatar and Notifications accessible in Edit mode
[#1943](#1943) Window Business Partner Group Advanced Edit
[#501](metasfresh/metasfresh-webui-api-legacy#501) Picking prototype (v4)
[#1011](metasfresh/metasfresh-webui-frontend-legacy#1011) Checking/ unchecking flags in included tabs lead to errors in console
[#966](metasfresh/metasfresh-webui-frontend-legacy#966) sitemap: menu item incorrectly flagged as favorite in search result
[#942](metasfresh/metasfresh-webui-frontend-legacy#942) grid view: automatically open the included view when clicking on a row
[#930](metasfresh/metasfresh-webui-frontend-legacy#930) Refactor/unify Menu and Sitemap
[#836](metasfresh/metasfresh-webui-frontend-legacy#836) Outbound eMail functionality
[#495](metasfresh/metasfresh-webui-api-legacy#495) API: Functionality to add Actions for Subtab Data
[#948](metasfresh/metasfresh-webui-frontend-legacy#948) Define refactoring plan for filters model
[#891](metasfresh/metasfresh-webui-frontend-legacy#891) Blocked cells

me-45
@metas-lc metas-lc self-assigned this Jul 18, 2017
@metas-lc
Copy link

IT

  1. go to a document which has referenced documents. E.g. Sales order
  2. select a document and go to referenced documents, Open one e.g. Invoice candidates
    => notice the sticky filter (in my case for order) - the docs are filtered
  3. use back and forward buttons
    => filter is still there - the docs are still filtered OK
  4. select the filter
    => filter disappears and all the documents are shown (no filter is applied) OK
  5. press back to have the filter again, then select the "go to default documents list" breadcrumb
    => filter disappears and all the documents are shown (no filter is applied) OK

@teosarca
Copy link
Member Author

removed legacy code: metasfresh/metasfresh-webui-api-legacy@f5ca025

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

7 participants