-
-
Notifications
You must be signed in to change notification settings - Fork 198
Feature/chapters index page #1069
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
Conversation
|
@yihyang thanks for the PR, please give me a few days to review it, I'll try to get to it this week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yihyang
re "trust me I'm a programmer". Don't need to trust you as your pull request say you're a programmer. The code was immaculate. 👍
I'm a contributor - I can't approve your work and I don't know anymore about the issue than I've read. These are just my opinions. If you don't agree with them feel free to ignore. You've already met the maintainer @matyikriszta.
-
I would squash the commits - I think it just makes it more difficult seeing the changes - I agree with all of the code climate changes.
-
The grammar change throughout the test file (see other comment).
-
The UX changes are listed below
- Margin between links
- Active links on the index to the item
- Toggling active/not-active with checkbox
1 margin between links
The links need a bit more margin between the links (see below).

2. Active links on the index to the item
I expect that indexes link through to the actual items - am I missing the link below?

3. Toggling active/not-active with checkbox
Isn't "Active?" and actions normally combined into a checkbox? (see below)

👍
spec/features/admin/chapters_spec.rb
Outdated
| assert_chapters_exist_on_page(inactive_chapters) | ||
| end | ||
|
|
||
| scenario 'an admin can filter and view only active chapters' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filter and view" => "filter to view"
Personally, I would have written "an admin can view only active chapters" the filter is an implementation detail which is already implied - I don't have strong view on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @notapatch thanks for the suggestions, I have updated it in 91c732d
0c3dec6 to
f2d1698
Compare
|
Hi @matyikriszta @notapatch , sorry for the late reply. I hope that everyone is safe during this times. I have updated the PR as per suggestion, please have a look, thanks! |
| @@ -0,0 +1,15 @@ | |||
| module WaitForAjax | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
despo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yihyang thanks for the PR. I left some feedback.
| @chapter.update(update_active_params) | ||
|
|
||
| head :ok | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we stick to standard rails CRUD operations and reuse update to achieve this instead. The active param can just be part of chapter_params and the existing update method could be used to achieve the same thing.
| .large-1.columns | ||
| = check_box_tag :chapter_active, 'true', chapter.active?, class: 'chapter_active', data: { 'chapter-id': chapter.id, } | ||
|
|
||
| - content_for :page_footer do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind having javascript available as well, however it should be optional and not the default. Also, a confirmation button to verify disabling chapters before any actions take place.
| @@ -0,0 +1,45 @@ | |||
| %section#banner | |||
| .row | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a .row in foundation should contain column elements, so here there should be a large-12.columns to achieve correct alignment.
| | ||
| = link_to t('.view_inactive_chapters'), admin_chapters_path(active: false) | ||
| .row | ||
| %hr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to the comment above, as a row is made up of column elements, hr should be within a .large-12.columns
config/routes.rb
Outdated
| resources :member_notes, only: [:create] | ||
|
|
||
| resources :chapters, only: %i[index new create show edit update] do | ||
| member do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be removed as per comments added above
spec/features/admin/chapters_spec.rb
Outdated
|
|
||
| background { login_as_admin(member) } | ||
|
|
||
| scenario "an admin can view all chapters and it's information" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please update to ...all chapters and their information
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Closing as stale. |
Issue: #738
Screenshot: