Skip to content

Conversation

@sachinchauhan2889
Copy link
Contributor

@sachinchauhan2889 sachinchauhan2889 commented Dec 5, 2020

Fixes #5756

Short description of what this resolves:

add images filter

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Dec 5, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/hi2i42trb
✅ Preview: https://open-event-frontend-git-add-image-filter.eventyay.vercel.app

@codecov
Copy link

codecov bot commented Dec 5, 2020

Codecov Report

Merging #5923 (2a7b29f) into development (a26de28) will decrease coverage by 0.03%.
The diff coverage is 42.85%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5923      +/-   ##
===============================================
- Coverage        23.53%   23.50%   -0.04%     
===============================================
  Files              511      511              
  Lines             5489     5501      +12     
  Branches            66       66              
===============================================
+ Hits              1292     1293       +1     
- Misses            4180     4191      +11     
  Partials            17       17              
Impacted Files Coverage Δ
app/components/explore/side-bar.js 16.39% <33.33%> (-0.56%) ⬇️
app/controllers/explore.js 33.33% <42.85%> (ø)
app/routes/explore.js 56.75% <50.00%> (-0.82%) ⬇️
app/components/tabbed-navigation.js 33.33% <0.00%> (-20.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a26de28...2a7b29f. Read the comment docs.

@iamareebjamal
Copy link
Member

iamareebjamal commented Dec 5, 2020

Change to has_image, has_logo

eventLocationType = null;

@computed('category', 'sub_category', 'event_type', 'startDate', 'endDate', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online')
@computed('category', 'sub_category', 'event_type', 'startDate', 'endDate', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online', 'has_logo', 'has_images')
Copy link
Member

Choose a reason for hiding this comment

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

has_image, not has_images

event_name : null,
is_online : null,
has_logo : 'false',
has_image : 'false',
Copy link
Member

@iamareebjamal iamareebjamal Dec 5, 2020

Choose a reason for hiding this comment

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

I believe this has wrong indentation? Please check, I'm reviewing on Mobile

Copy link
Contributor Author

@sachinchauhan2889 sachinchauhan2889 Dec 5, 2020

Choose a reason for hiding this comment

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

ohh sorry. i give replace all command. thats why identation got wrong. sorry
i will fix this

@iamareebjamal
Copy link
Member

On mobile, all filters except CFS and image options are hidden. Please hide them as well. And the filters are pre-selected. Please unselect

@sachinchauhan2889
Copy link
Contributor Author

@iamareebjamal plz review

Comment on lines 82 to 87
if (!params.has_image) {
filterOptions.push({
name : 'original-image-url',
op : 'ne',
val : null
});
Copy link
Contributor

Choose a reason for hiding this comment

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

the condition used inside is for checking if it has a image. And it is named like "not has_image".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When has_image=null, this condition become true and only events with images are shown.
When has_image=false, this condition hold false and all events whether image is present or not will be shown.

Copy link
Member

Choose a reason for hiding this comment

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

That's opposite logic though. has_image=true should only show events with images

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's opposite logic though. has_image=true should only show events with images

Now i am little bit confused.
Please correct me if i am wrong.
Desired result:----> when has_image=null, all events shown whether it have image or not.
When has_image=true, events with images must be shown.

Copy link
Member

Choose a reason for hiding this comment

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

Yes

op : 'ne',
val : null
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@iamareebjamal iamareebjamal merged commit 6217e7c into fossasia:development Dec 8, 2020
@sachinchauhan2889 sachinchauhan2889 deleted the add-image-filter branch December 8, 2020 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search Page: Add search filter "Images" to the left side menu and enable Image and Logo by default

3 participants