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

Homepage news items section rework #2078

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

luistoptal
Copy link
Collaborator

Pull request for issue: #208

This is a pull request for the following functionalities:

  • full rework of news section in home page

image

How to test?

Visit the home page and verify the following:

  • I expect there are no news items to display, so the section should not be displayed at all
  • go to protected/components/NewsAndFeedsService.php and in the getTodaysNews function remove the second conditional so that all news are displayed
  • refresh the home page. you should see a news section with a carousel and news boxes
  • clicking on a "read more" link should open the detail page

alternatively you can create more news items from the admin page http://gigadb.gigasciencejournal.com/news/admin and they should show up in the home page

How have functionalities been implemented?

  • the carousel uses the bootstrap carousel and overrides the styles to match the gigadb colors and to make it look better
  • the logic was tweaked to cover a handful of use cases:
    • the carousel is responsive and reactive to the screen width
    • mobile shows one item
    • medium screen shows two items
    • desktop shows three items
    • if the number of items to display is less than the maximum, for example, for desktop, if there are just two news items, rather than showing a blank space, the two news items fill all the space
    • if there are less news items than the maximum that can be displayed at any given time (e.g. 3 for desktop) then the carousel controls are hidden

Any issues with implementation?

--

Any changes to automated tests?

tests pass. As far as I have seen, there are no acceptance tests covering this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant