Skip to content
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

Filterbar context #1693

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from
Open

Filterbar context #1693

wants to merge 31 commits into from

Conversation

rkzel
Copy link
Collaborator

@rkzel rkzel commented Nov 26, 2019

All changes description are in commit messages. Short version would be: reorganized Issues, separated Filtering Options and reused them in new Filtering Panel (for mobile users), added Filtering context, cleaned up Projects...

rkzel and others added 30 commits November 6, 2019 02:05
Moved outside of main FilterBar component, no more automatic closing
of DropDowns when en option has been selected.
Because that's where all FilterBar modules live.
ActiveFilters is that little div below FilterBar dropdowns
displaying all (and only) active filters: [tag X]. This change
allows all current Options to use 'name' property instead
of variety like 'name', 'title', etc. All future filters
should follow this trait.
Also, 'filters' are now called 'activeFilters' eveywhere, for clarity.
for "mini filterbar".

Also, activeIndex is now a simple int.
Problem fixed: resetting filters with setActiveFilters(INIT_FILTERS)
didn't work, setActiveFilters({...INIT_FILTERS}) didn't work either.
Cause: that initial structure was copied shallowly. Therefore filters
enabled with toggle() survived. Fix:

setActiveFilters(initFilters())

This function returns bran new structure.
We need to prevent un-rendering <Issues />, as this causes all of its
state to be re-initialized once it's rendered again.

This is exactly what was happening when we were returning early from the
IssuesQuery component when it was in the `loading` state.
Instead of asking IssuesQuery to display different components
depending on what state the query is in - loading, error, etc.
Issues got rendered only after data has been returned - which
meant destroying it every now and then, and that was unhelpful
for number of hooks rendered, remembering already downloaded
issues, etc.
Now Issues component is always rendered and it itself decides
whether to display list of Issues (when data is finally present)
or messages about state of the query (loading/error, etc).
* dev:
  Changed all 'Review' texts to 'View'
  Rewards/MyRewards: add date to claimed status
  CODEOWNERS: fix capitalization of team names
  Rewards/ViewReward: add status info
  Rewards/ViewReward: changes after rebase
  Rewards/ViewReward: add status information
  Rewards/ViewReward: dynamic panel title
  Show SubmitWork option to issue owner only
  Projects/FundIssues: only validate after blur
  Projects/FundForm: improve "can't be zero" errors
  Projects: Context menu sentence case
  Dot Voting: Fix Label color
  Projects: fix frontend stub
  Rewards/My Rewards: add icons to "status"
  Rewards/My Rewards: add icons to "status"
  Rewards: improve error message for non-transferable assets
Neither the MiniFilterBar nor the full FilterBar were displaying on
screens 514px wide exactly
Do not show on IssueDetail page
The props that were passed into TextFilter were not used anywhere
outside of the component, and can therefore live within it instead.
@chadoh chadoh force-pushed the filterbar-context branch 3 times, most recently from 38968b3 to 5b05b35 Compare December 3, 2019 16:12
@ottodevs ottodevs assigned ottodevs and unassigned chadoh Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants