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

Sort conferences #19

Merged
merged 3 commits into from Oct 16, 2023
Merged

Sort conferences #19

merged 3 commits into from Oct 16, 2023

Conversation

antopalidi
Copy link
Member

fixes #18

@antopalidi antopalidi self-assigned this Oct 11, 2023
Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

I'm not sure this is ordering in the way we want. Please check the comments.

Also, this is ordering in ruby, which means it relays that all conferences are loaded before doing it. his works because we don't have pagination (we ordered in the database in this case https://github.com/Som-Energia/decidim-som-energia-app/pull/78/files). We can leave it like it is for the moment but we need to be aware of that if some day they ask to add pagination.

I would recommend add a comment in the service class stating this fact.

expect(subject).to eq([
upcoming_conference_one,
upcoming_conference_two,
past_conference_two,
Copy link
Contributor

Choose a reason for hiding this comment

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

past_conference_two is older thant past_conference_one, shouldn't go last?

order should be like

near future
distant future
near past
distant past

Comment on lines +7 to +12
let(:organization) { create(:organization) }
let(:upcoming_conference_one) { create(:conference, :published, promoted: false, organization: organization, start_date: 1.week.from_now, end_date: 2.weeks.from_now) }
let(:upcoming_conference_two) { create(:conference, :published, promoted: false, organization: organization, start_date: 2.weeks.from_now, end_date: 3.weeks.from_now) }
let(:past_conference_one) { create(:conference, :published, promoted: false, organization: organization, start_date: 2.months.ago, end_date: 1.month.ago) }
let(:past_conference_two) { create(:conference, :published, promoted: false, organization: organization, start_date: 3.months.ago, end_date: 2.months.ago) }

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add more cases ordered in different ways to be sure that are not created in the database in the same order that will be checked after.

@microstudi microstudi self-assigned this Oct 16, 2023
@microstudi microstudi merged commit d40bb4a into main Oct 16, 2023
1 check passed
microstudi added a commit that referenced this pull request Mar 5, 2024
* sort conferences

* refactoring

* fix order

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>
microstudi added a commit that referenced this pull request Mar 6, 2024
* Triplicate conferences hacking the hashtag (#7)

* add custom menu items

* controller override, add routes

* change add item menu

* Apply suggestions from code review

Co-authored-by: Ivan Vergés <ivan@pokecode.net>

* add options if to add_item

* add rspec, refactoring

* fix lint

* promoted conferences override, add tests

* remove global config from secret, refactoring controller's methods

* change tests

* add controller spec

* fix robocop

* move initializers and overrides to initializers folder

* refactoring model and tests

* Update config/locales/en.yml

Co-authored-by: Ivan Vergés <ivan@pokecode.net>

* fix initializers

* fix initialize

* gitignore

* add actions

* add config

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>

* change color pallete in the css (#13)

* remove additional logo (#12)

* Filter conferences by colors (#14)

* Replace hashtags, Remove menu "triplication"

* Replace hashtags

* show buttons for existing conferences

* refactoring

* add original to deface

* cells override

* use a query string

* add tests

* add controller spec

* add spec checksums

* change default links color

* active links

* styles

* add promo video content block (#15)

* add promo video content block

* fix active processes cell

* fix var css

* update newsletter. add translations

* Create a new home content block with partner logos (#16)

* add content block

* add logos

* add logos

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>

* add partners to dockerfile

* fix dockerfile

* rebuild 1st partner

* filter order & small fixes

* filter order

* fix promoted conferences (#17)

* fix promoted conferences

* css corrections

* fix specs

* fix logos

* fix apostrophes

* add premsa i programa

* new program

* copy fix

* prevent non conferences to use hashtag hack

* add omniauth decidim

* update mailer styles

* update pwa

* latests fixes

* add missing envs

* Sort conferences (#19)

* sort conferences

* refactoring

* fix order

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>

* fix order again

* override image size media

* update agenda

* update newsletter & logos

* fix logos

* Add datetime in conferences cards (#24)

* fix test

* add datetime

* add start_time and start_date method

* fix overrides spec

* add chromedriver-version

* use start and end date

* add date format

* remove start and end time methods

* add system test

* pass rubocop

* add spec system test

* modify system test date fotmat

* modify system test date format

* update newsletter

* update news

* change decidim version

* remove social share button

* update package.json dependencies

* add tailwind.config to .gitignore

* update rubocop.yml

* update migrations code

* add missing mixin

* remove _decidim-settings.scss

* enable Custom HTML Header snippets

* include conference Override

* add Module Paginable to conference controllerOverride

* fix lib and system specs

* fix controller specs

* remove PR#24 changes

* assign main-footer color

* apply styles to active-processes section

* apply styles to newsletter button

* style sub_hero text description

* add styles to sub_hero button

* replace mini-footer with deface

* adjust mini-footer styles

* fix styles loader error

* replace main-footer with deface

* fix styles

* fix test

* add homepage footer spec

* add final newline to spec

* modify chromedriver setup

* add chromedriver-version

* set up chromedriver

* pass rubocop

* update newletter

* modify some content_blocks styles

* fix partner_logos content_blocks styles

* fix conferences filter

* remove participatory space floting help

* fix filter conferences bg class

* setup chromedriver

* bundle gems

* change chromedriver version

* change chromedriver version

* add chrome version to workflow

* fix test

* add cards filter-conferences border-color

* remove few old partners logo

* add locales_languages to mobile menu

* set partner logos size

* fix dockerfile

* fix dockerfile

* fix migrations

* fix migrations

* add awesome preview

* add margn bottom to navbar

* add .rspec-failures to gitignore

* remove cta-buttom override

* fix hero content-block-button

* change color menu

* modify item color menu

* design fixes

* update texts

* fix fonts and cells

* newsletter template

* logos sizes

* standarize footer

* prevent sql files to be commited

* add scripts with cookie conf

* update logo

* fix logos

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>
Co-authored-by: Anna Topalidi <60363870+antopalidi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update order of conferences: Showing conferences
3 participants