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

Basic changes for image presenter #3489

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

anitagraham
Copy link
Contributor

This PR is a precursor to another one that I have ready to go, but it doesn't fit in the scope of that PR.

Before

'refinery/images/index' can present two different views of the images: list-view and grid-view.
The code to do this was split over several files, and there wasn't much congruence between the code for the two views, though the final markup was not much different.

In the process of implementing a small change to the UI ('click to edit') I have rewritten the index view so that both views use the same code, with a single difference between them.

Now

The image and list views look much the same as they did, with some markup and styling changes.

The markup for the image index is now generated by the same code whether the user has selected List View or Image View.

The appearance of the views has not changed significantly, but the markup/styling to achieve that has.

  1. css-grid is used in both index views.
  2. In the list view it is used to clearly separate the image title, the locales and the actions. The image file-name sits below the image title in a smaller font.
  3. In the list view it allows for simpler markup.

Note 1: Gemfile:
Use refinerycms-wymeditor, branch: master

Note 2:
The images do have 'click to edit'. That is, to edit an image click on any of

  1. title (list view)
  2. thumbnail (grid view)
  3. Language/locale marker (now in grid view as well as list view)
  4. The edit icon on the right

Screenshots

Grid view with locales

List view with locales

@anitagraham anitagraham force-pushed the imagePresenter branch 2 times, most recently from 407a75a to b6adbc8 Compare January 26, 2021 02:14
@@ -1,6 +1,7 @@
source 'https://rubygems.org'

gemspec
gem 'rails', '~>6.0'
Copy link
Member

Choose a reason for hiding this comment

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

is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I don't think so. I'll remove and test again.

Gemfile Outdated Show resolved Hide resolved
. ensure markup is identical for each view as far as possible
. Use css-grid to prevent image title/file name overwriting icons
. Add locale markers to images in grid view
…ruby is deprecated

Merge imagePresenter and collectionPresenter.
Tests pass.
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

2 participants