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

Afform - provide easy way to add navigation menu from the form #24013

Merged
merged 3 commits into from
Jul 19, 2022

Conversation

colemanw
Copy link
Member

Overview

Allows admin to create a navigation menu entry while editing an Afform.

Before

Navigation menu can be created manually.

After

Navigation menu can be created automatically, very similar to the way it works in CiviReport.

Comments

One cool thing I added here was insta-refresh, so as soon as you save the Afform you'll see the navigation menu update without a page reload needed.

@civibot
Copy link

civibot bot commented Jul 18, 2022

(Standard links)

@civibot civibot bot added the master label Jul 18, 2022
…item

Historically the expectation was that this cache gets flushed manually.
I've kept that unchanged for legacy code (v3 create/delete and direct BAO::add)
but with APIv4 and onward the cache will get flushed automatically after a write operation.
@eileenmcnaughton
Copy link
Contributor

It works well in my testing - there is a question around the fact the reset doesn't happen after single create/updates (which most BAOs do, if needed) but that is pre-existing & I can see the performance advantage

@eileenmcnaughton eileenmcnaughton merged commit a9882d7 into civicrm:master Jul 19, 2022
@eileenmcnaughton eileenmcnaughton deleted the afformNav branch July 19, 2022 07:24
@mattwire
Copy link
Contributor

Nice! Thankyou @colemanw

@colemanw
Copy link
Member Author

Thanks @eileenmcnaughton - just to be clear, APIv4 always calls the plural functions writeRecords and deleteRecords even when it's only working with 1 item.

But yea, I left the legacy v3 and direct BAO stuff alone because there's a pre-existing expectation that you have to flush caches manually after using those (which I guess is better for performance but it's sucky DX).

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.

3 participants