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/user-interface#51 Remove top buttons on admin forms #26886

Merged
merged 1 commit into from Jul 20, 2023

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Jul 20, 2023

Overview

https://lab.civicrm.org/dev/user-interface/-/issues/51

Before

image

image

image

After

image

image

Technical Details

Many forms open in popups, so the top buttons are often not visible anyway.

Some files have been deleted because I could not find where they are used:

  • templates/CRM/Admin/Form/Setting/Event.tpl
  • templates/CRM/Contribute/Form/PaymentInstrument.tpl
  • templates/CRM/Contribute/Form/Preview.tpl

I found some dead forms, but did not remove them for now, because some seem to be in the default navigation menu:

  • /civicrm/admin/report/register = CRM_Report_Form_Register (tpl and PHP) - accessible from /civicrm/admin/report/options/report_template?reset=1
  • /civicrm/admin/paymentProcessorType = CRM_Admin_Page_PaymentProcessorType (tpl and PHP)

Comments

I might not remove the top buttons on a few pages that I know can be very long, such as:

  • List of Message Templates
  • List of Profiles

I was not able to test Survey > Release Respondents. I couldn't figure out how to make it work (it would bounce me to the Advanced Search).

@civibot
Copy link

civibot bot commented Jul 20, 2023

Thank you for contributing to CiviCRM! ❤️ We will need to test and review the PR. 👷

Introduction for new contributors
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers

@civibot civibot bot added the master label Jul 20, 2023
@civibot
Copy link

civibot bot commented Jul 20, 2023

No issue was found matching the issue reference given in the pull request title. Please check the syntax.

@mlutfy mlutfy marked this pull request as draft July 20, 2023 10:56
@mlutfy mlutfy changed the title dev/user-interface#51 Remove top buttons on admin forms WIP dev/user-interface#51 Remove top buttons on admin forms Jul 20, 2023
@mlutfy mlutfy force-pushed the ui51 branch 2 times, most recently from fc34d95 to 282a772 Compare July 20, 2023 11:19
@magnolia61
Copy link
Contributor

👍

@mlutfy mlutfy marked this pull request as ready for review July 20, 2023 18:29
@mlutfy mlutfy changed the title WIP dev/user-interface#51 Remove top buttons on admin forms dev/user-interface#51 Remove top buttons on admin forms Jul 20, 2023
@mlutfy
Copy link
Member Author

mlutfy commented Jul 20, 2023

Ready for review 🎉

There are a few "top" buttons left, either because it's EventInfo, or I wasn't sure how to reach that part of the code, or I was done procrastinating.

I did test most of the changes. I may have cut corners in a few places, where I was fairly confident it was fine (like in the Import forms, I tested only Contact Import).

I also updated sometimes the "status" markup, because it's something I'd like to also address eventually (https://lab.civicrm.org/dev/user-interface/-/issues/52).

</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
<div class="spacer"></div>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

@mlutfy why was this file deleted?

Copy link
Member

Choose a reason for hiding this comment

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

@mlutfy why was this file deleted?

Copy link
Member

Choose a reason for hiding this comment

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

And this one?

@mlutfy
Copy link
Member Author

mlutfy commented Jul 20, 2023

@colemanw I could not find any references to the deleted files.

  • templates/Contribution/Form/Preview.tpl - has fields for things like cvv2, it looks very legacy
  • templates/CRM/Admin/Form/Setting/Event.tpl - couldn't find any reference either, there is another tpl for CiviEvent settings, which includes the Event Cart setting.

I have to admit I have doubts about templates/CRM/Contribute/Form/PaymentInstrument.tpl, but it's an oddly named template. There is nothing under Manage Contribution Page, nor in places such as /civicrm/admin/options/payment_instrument?action=add&reset=1.

For all 3 templates, I looked at the git log and there were no changes in a very long time (other than mechanical cleanups).

@colemanw
Copy link
Member

Ok I just double checked and I agree they are unused.

@colemanw colemanw merged commit 97c67a6 into civicrm:master Jul 20, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants