Branch: refs/heads/master
  Home:   https://github.com/zanata/zanata-platform
  Commit: 3d788f8d80afe872f647c6a1ff62356397fe486b
      
https://github.com/zanata/zanata-platform/commit/3d788f8d80afe872f647c6a1ff62356397fe486b
  Author: David Mason <drdma...@gmail.com>
  Date:   2017-08-17 (Thu, 17 Aug 2017)

  Changed paths:
    A api/zanata-common-api/src/main/java/org/zanata/rest/dto/FilterFields.java
    M 
api/zanata-common-api/src/main/java/org/zanata/rest/service/ProjectVersionResource.java
    M 
server/functional-test/src/main/java/org/zanata/page/editor/ReactEditorPage.java
    M 
server/functional-test/src/test/java/org/zanata/feature/editor/EditorAlphaTest.java
    M 
server/services/src/main/java/org/zanata/rest/service/ProjectVersionService.java
    M server/services/src/main/java/org/zanata/util/DateUtil.java
    M 
server/services/src/main/java/org/zanata/webtrans/server/rpc/GetTransUnitListHandler.java
    M 
server/services/src/test/java/org/zanata/rest/service/ProjectVersionServiceUnitTest.java
    M 
server/zanata-frontend/src/frontend/app/editor/actions/controls-header-actions.js
    M server/zanata-frontend/src/frontend/app/editor/actions/glossary-actions.js
    M 
server/zanata-frontend/src/frontend/app/editor/actions/phrases-action-types.js
    M server/zanata-frontend/src/frontend/app/editor/actions/phrases-actions.js
    A 
server/zanata-frontend/src/frontend/app/editor/actions/phrases-filter-actions.js
    M server/zanata-frontend/src/frontend/app/editor/api/index.js
    M server/zanata-frontend/src/frontend/app/editor/app.css
    M 
server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/EditorSearchInput.story.js
    M 
server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/EditorSearchInput.test.js
    M 
server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/index.css
    M 
server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/index.js
    A 
server/zanata-frontend/src/frontend/app/editor/components/PhraseStatusFilter/PhraseStatusFilter.test.js
    A 
server/zanata-frontend/src/frontend/app/editor/components/PhraseStatusFilter/index.js
    R 
server/zanata-frontend/src/frontend/app/editor/components/TransUnitFilter/TransUnitFilter.test.js
    R 
server/zanata-frontend/src/frontend/app/editor/components/TransUnitFilter/index.js
    M 
server/zanata-frontend/src/frontend/app/editor/containers/ControlsHeader.js
    M server/zanata-frontend/src/frontend/app/editor/containers/MainContent.js
    M server/zanata-frontend/src/frontend/app/editor/containers/Root/index.css
    M server/zanata-frontend/src/frontend/app/editor/containers/Root/index.js
    M server/zanata-frontend/src/frontend/app/editor/css/base/lib/forms.css
    M server/zanata-frontend/src/frontend/app/editor/css/theme/lib/theme.css
    M server/zanata-frontend/src/frontend/app/editor/css/utils-size/index.css
    M server/zanata-frontend/src/frontend/app/editor/css/utils-space/index.css
    M server/zanata-frontend/src/frontend/app/editor/index.js
    A server/zanata-frontend/src/frontend/app/editor/middlewares/call-api.js
    A server/zanata-frontend/src/frontend/app/editor/middlewares/index.js
    M 
server/zanata-frontend/src/frontend/app/editor/middlewares/new-context-fetch.js
    R 
server/zanata-frontend/src/frontend/app/editor/middlewares/selected-phrase-searches.js
    R server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer.js
    R 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer.test.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/filter-status-reducer.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/filter-status-reducer.test.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/index.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/phrase-filter-reducer.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/phrase-filter-reducer.test.js
    A 
server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer/phrase-reducer.test.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/ui-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/ui-reducer.test.js
    A server/zanata-frontend/src/frontend/app/editor/selectors/index.js
    R server/zanata-frontend/src/frontend/app/editor/utils/TransStatusService.js
    R server/zanata-frontend/src/frontend/app/editor/utils/api-util.js
    R server/zanata-frontend/src/frontend/app/editor/utils/filter-paging-util.js
    A server/zanata-frontend/src/frontend/app/editor/utils/filter-util.js
    A server/zanata-frontend/src/frontend/app/editor/utils/log-todo.js
    M server/zanata-frontend/src/frontend/app/editor/utils/phrase-util.test.js
    M server/zanata-frontend/src/frontend/app/editor/utils/status-util.js
    A server/zanata-frontend/src/frontend/app/editor/utils/status-util.test.js
    A server/zanata-frontend/src/frontend/app/editor/utils/string-utils.test.js
    A server/zanata-frontend/src/frontend/app/editor/watchers/index.js
    A server/zanata-frontend/src/frontend/app/editor/watchers/page-number.js
    A server/zanata-frontend/src/frontend/app/editor/watchers/phrase-detail.js
    A server/zanata-frontend/src/frontend/app/editor/watchers/phrase-list.js
    A 
server/zanata-frontend/src/frontend/app/editor/watchers/selected-phrase-searches.js
    A server/zanata-frontend/src/frontend/app/editor/watchers/watch.js
    M server/zanata-frontend/src/frontend/package.json
    M server/zanata-frontend/src/frontend/yarn.lock

  Log Message:
  -----------
  Add advanced search component to editor (ZNTA-975) (#443)

* refactor(TransUnitFilter): linting fixes

* refactor(editor filter): move status filter data to state.phrases.filter

The status filtering is all about filtering the list of phrases, so
it belongs in the phrase section with advanced search filter data which
will soon be added.
This change will help reduce the amount of distant data that reducers need
to access.

* refactor(editor filter): move phrase status filter actions to 
phrases-filter-actions

This includes making the TransUnitFilter component a completely connected
component deriving all its props from mapStateToProps and mapDispatchToProps.
All the components in the headers should move in this direction, so that
the header components can stick to the single responsibility of defining
the layout of the other components.

* refactor(phrase filter): use flux standard actions for status filter

All the actions will be updated to be flux standard actions (FSAs), and
I have edited these actions, so this is an appropriate time to update
them.
This also removes the warning for using a non-symbol as an action type,
since all action types will be changed to strings so that they are
serializable (required for advanced development tools such as time-travel
debugging).

* refactor: rename TransUnitFilter to PhraseStatusFilter

* feat(ZNTA-975): add advanced search state, actions and reducer

* test: fix linting warnings in EditorSearchInput.test.js

* feat(ZNTA-975): connect EditorSearchInput to app and state

* feat(ZNTA-975): add filter fields to status list endpoint

* feat(ZNTA-975): apply style class to input component

Includes a FIXME comment because the css classes need to be moved for
maintainability.

* refactor(editor): move middleware config to separate module

* feat(ZNTA-975): add selectors for current page of phrases

These are not used yet, but selectors should replace most places that we
are manually pulling out or calculating pieces of state from the store.
They will allow changing in one place if we move some state, and will
be more efficient for calculated state since they memoize the input selectors.

* feat(ZNTA-975): allow filter parameters in phrase fetch request

* WIP: fetch filter phrases from server (NOT USED YET)

* WIP: add logging wrapper around redux-watch

* feat(ZNTA-975): fetch and store server-filtered phrase list

Does not yet display the fetched list.

* feat(ZNTA-975): add selector for hasAdvancedFilter

* feat(ZNTA-975): display filtered phrases when filter is present

* feat(ZNTA-975): WIP fixing all phrase list refs for filter, fixed paging

Paging was using old location, changed to use selectors to it will adapt
when selectors change next time.

* feat(ZNTA-975): use watcher for glossary and suggestion searches

Includes moving middleware setup to middlewares/index.js since that
makes more sense and keeps the top level cleaner.

* fix(setState): use callback form of setState for search input

The other form has a theoretical state-clobbering bug.

* feat(ZNTA-975): only select first row when unfiltered list is loaded

* test(ZNTA-975): update tests to work with plain/filtered status lists

* feat(ZNTA-975) fix advanced search icon alignment

* feat(ZNTA-975): use standard action names for phrase list and detail

* feat(ZNTA-975): use consistent names for search fields between server and 
editor

* feat(ZNTA-975): clean up some comments

* feat(ZNTA-975): prevent network request for empty filter search

* feat(ZNTA-975): use request body for phrase filter fields

* feat(ZNTA-975): add middleware to include meta.timestamp in all API calls

The middleware also adds some repeated defaults such as credentials and
JSON headers, which avoids the need to wrap calls in a helper function.
I chose a distinct type rather than reusing CALL_API so that there is a
way to skip the new behaviour if that is ever needed.

* feat(ZNTA-975): use timestamp to ignore stale advanced search results

* feat(ZNTA-975): correctly select visible phrase when phrases load

* feat(ZNTA-975): limit to a single phrase detail request at a time

Also only fetches phrases that do not yet have detail present.

* feat(ZNTA-975): remove some unused css

* feat(ZNTA-975): move styles for EditorSearchInput to its css file

They were in the root css file. There is still duplication and
rules conflicting/competing with other rules so more cleanup is
needed.

* feat(ZNTA-975): remove unused functions

These are replaced by new functions in the watchers, since that is
the only place they are used.

* feat(ZNTA-975) added media queries for EditorSearchInput

* feat(ZNTA-975) improved width of advanced search panel in editor

* feat(ZNTA-975) css formatting

* refactor: add FIXME comment for fragile css rule

I forgot to edit my reminder comment before and it was removed. This
replaces it with a more useful comment.

* test(ZNTA-975): update some tests to factor in request timestamps

* feat(ZNTA-975): remove blur-based closing of advanced search panel

This is less surprising to users, but the main reason for this change
is that the show/hide advanced button is confusing when the advanced
panel is visible-on-focus only. The focus tracking to have that button
toggle back to "show advanced" on blur is very complicated because it
is difficult to tell whether the activity that caused a blur came from
within the panel when it was not a focus on another input element.

* test(ZNTA-975): update test to match new expected advanced search panel 
behaviour

* feat(ZNTA-975): fix storybook prop names

* feat(ZNTA-975): align advanced search inputs

Also attempted to make it less visually busy by removing the
borders and using a more subtle colouring and shadow. Could
still need some work.

* test(ZNTA-975): update test to match new markup in advanced search fields

* fix(ZNTA-975): add missing Strings dependency

This was removed by accident when resolving a merge conflict.

* fix(ZNTA-975): remove some unused imports

This is to satisfy the Java compiler warnings check which is currently
marking the build unstable.

* fix(ZNTA-975): wait for phrase loading in editor test

* feat(ZNTA-975): fix advanced search input and panel width across browsers

Stretch input to fill container in firefox, and limit panel width to width
of container in chrome.

* feat(ZNTA-975): move labels for advanced search to give inputs more width

At narrow panel sizes, the inputs for advanced search fields were too narrow.
This moves the labels above the inputs so they can span the full width of the
panel.

* feat(ZNTA-975): update test for changed EditorSearchInput markup

* test: increase test coverage

* refactor: delete unused module


_______________________________________________
zanata-commits mailing list
zanata-commits@redhat.com
https://www.redhat.com/mailman/listinfo/zanata-commits

Reply via email to