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

dev/core#1547 Add DT_RowClass CSS classes to nested group markup #16359

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

jensschuppe
Copy link
Contributor

Overview

The Group search form template does not use jquery.datatables for loading child rows. That might be ok, since it's working without it, but there are CSS classes in each response.data.DT_RowClass and maybe other properties that are not being injected into the template.
This makes it difficult to distinguish nested groups from their parents and subsequent non-nested groups, since the CSS class crm-group-child (which actually has CSS for visual nesting) is being added to the DT_RowClass attribute in PHP code, but that is not added to the actual markup.

Before

Nested groups are not indented in the group list.

After

CSS for nesting child groups is now applied (since the CSS class is there) and nested groups are indented in the group list.

Technical Details

This adds all CSS classes in DT_RowClass to the actual markup, so that the class crm-group-child, which is added to that property in CRM_Contact_BAO_Group::getGroupList() gets actually printed to the markup.

Comments

Using jquery.datatables for loading child groups would be the better solution, as already noted in the TODO in the code.

@civibot
Copy link

civibot bot commented Jan 23, 2020

(Standard links)

@civibot civibot bot added the master label Jan 23, 2020
@BettyDolfing
Copy link

BettyDolfing commented Feb 17, 2020

test this please

1 similar comment
@jaapjansma
Copy link
Contributor

test this please

@jaapjansma
Copy link
Contributor

Betty and I are reviewing PR's and we came across this PR.

It was unclear to us how we could reproduce the issue before this patch is applied. It would have been helpful if you had provided a screenshot of before and after. But we managed in the end.

Screenshot before

Screenshot from 2020-02-19 10-21-11

Screenshot after

Screenshot from 2020-02-19 10-20-56

Review

  • General standards
    • Explain (r-explain)
      • PASS : The goal/problem/solution have been adequately explained in the PR and in the issue. A screenshot of before and after would have been helpful.
    • User impact (r-user)
      • PASS: The change would be intuitive or unnoticeable for a majority of users who work with this feature.
    • Documentation (r-doc)
      • PASS: The changes do not require documentation.
    • Run it (r-run)
      • PASS: See the provided screenshots
  • Developer standards
    • Technical impact (r-tech)
      • PASS: The change preserves compatibility with existing callers/code/downstream.
    • Code quality (r-code)
      • PASS: The functionality, purpose, and style of the code seems clear+sensible.
    • Maintainability (r-maint)
      • PASS: The change is trivial enough that it does not require tests.
    • Test results (r-test)
      • PASS: The test results are all-clear.

@mattwire or @eileenmcnaughton are you able to merge this?

@mattwire mattwire merged commit 6d57abc into civicrm:master Feb 19, 2020
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.

4 participants