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

"Go Live" items #18

Open
wants to merge 114 commits into
base: develop
Choose a base branch
from
Open

"Go Live" items #18

wants to merge 114 commits into from

Conversation

mrcasual
Copy link
Contributor

@mrcasual mrcasual commented May 21, 2024

This implements #16 and more.

Install the build file or clone the repo and run npm i && composer i && grunt.

To do

  • Improve styles, especially for DataTables
  • Add tooltip/docs links for each setting
'tooltip'           => __( 'When enabled it will only show any View entries after a search is performed.', 'gk-gravityview' ),
					'article'           => array(
						'id'  => '5c772fa02c7d3a0cb9320a84',
						'url' => 'https://docs.gravitykit.com/article/536-how-to-hide-results-and-only-display-them-if-a-search-is-performed',
					),

To test

Foundation

  • All options under GravityKit > Settings > Gravityview > Dashboard Views

View Editor

  • All options under the Dashboard Views tab
  • Field setting to exclude it from the frontend or Dashboard display

Various

  • Directory/Single Entry/Edit Entry views, pagination, sorting, etc.
  • Lightbox (file upload file gallery with images)
  • DataTables (with and without Ajax)
  • GravityEdit, GravityCalendar, GravityCharts, entry notes, entry revisions, etc.

P.S. When the Dashboard View is open, you can go to the View Editor by pressing Alt/⌥++V+E.

💾 Build file (0870858).

mrcasual added 30 commits May 1, 2024 16:16
Removing (at the moment) unnecessary hooks/methods and moving
things around.
At the moment the script configures "VE" shortcut to open the View
editor :)
By defalt, the slug will be a URL-safe name of the
Admin menu as configured under GravityView's global settings;
this slug can also be changed using a filter.

This also adds helper methods to get the submenu slug, as well
as to check if the submenu is a Dashboard View.
Currently there's a single setting, but more will be
added as per #9
It's now Alt/Option + V + E to open the View editor. The code
was refactored to allow for easy addition of other shortcuts.
This also refactors how assets are loaded and their names.
This is work in progress as the CI has not been configured and
there are no releases yet.
zackkatz and others added 3 commits May 27, 2024 12:26
We enqueue frontend assets in the View::render_view() method.
@zackkatz
Copy link
Member

zackkatz commented May 27, 2024

@mrcasual I'll add issues I find here in the comments.

On saving a pre-existing View that hasn't been saved since enabling Dashboard Views:

  thrown in /Users/zackkatz/Local/dev/app/public/wp-content/plugins/gravityview-dashboard/src/AdminMenu.php on line 128
[27-May-2024 16:44:50 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method GravityKit\GravityView\DashboardViews\AdminMenu::get_menu_position_by_id() in /Users/zackkatz/Local/dev/app/public/wp-content/plugins/gravityview-dashboard/src/AdminMenu.php:128
Stack trace:
#0 /Users/zackkatz/Local/dev/app/public/wp-includes/class-wp-hook.php(324): GravityKit\GravityView\DashboardViews\AdminMenu->add_admin_menu('')
#1 /Users/zackkatz/Local/dev/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#2 /Users/zackkatz/Local/dev/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /Users/zackkatz/Local/dev/app/public/wp-admin/includes/menu.php(161): do_action('admin_menu', '')
#4 /Users/zackkatz/Local/dev/app/public/wp-admin/menu.php(422): require_once('/Users/zackkatz...')
#5 /Users/zackkatz/Local/dev/app/public/wp-admin/admin.php(158): require('/Users/zackkatz...')
#6 /Users/zackkatz/Local/dev/app/public/wp-admin/post.php(12): require_once('/Users/zackkatz...')
#7 /Users/zackkatz/.composer/vendor/laravel/valet/server.php(250): require('/Users/zackkatz...')
#8 {main}
  thrown in /Users/zackkatz/Local/dev/app/public/wp-content/plugins/gravityview-dashboard/src/AdminMenu.php on line 128

Resolved: https://gravitykit.slack.com/archives/C727B06MB/p1716830269227759

@zackkatz
Copy link
Member

zackkatz commented May 27, 2024

@mrcasual I'm having issues with restricting access. This happens even when selecting all roles.

https://www.loom.com/share/b6be0528c69548d5960adfbf743fd3e2

Resolved: https://gravitykit.slack.com/archives/C727B06MB/p1716837388289959

@GravityKit GravityKit deleted a comment from zackkatz May 27, 2024
@crbdev
Copy link

crbdev commented May 30, 2024

Getting a critical error when trying to edit entries in a dashboard View

CleanShot 2024-05-30 at 11 14 09

Request::is_edit_entry() is expected to return an entry if
it is indeed an edit entry screen.
@mrcasual
Copy link
Contributor Author

@crbdev,

Getting a critical error when trying to edit entries in a dashboard View

Fixed in 0870858. It would help to know the actual error message in the future. You can enable debugging on your site or install this plugin.

@rafaehlers
Copy link

rafaehlers commented Jun 3, 2024

  • Should we clarify this text to mention that the View "name" here is the actual menu link?
    image

  • Let's clarify the text here mentioning that "Group order" means "order of the View within the group":
    image

  • A-Z Filters work ✅

  • The Approve Entries (ajax) field is not yet supported

@mrcasual
Copy link
Contributor Author

mrcasual commented Jun 4, 2024

@rafaehlers,

The Approve Entries (ajax) field is not yet supported

Entry approval works fine for me.

CleanShot 2024-06-03 at 22 07 00@2x

@zackkatz
Copy link
Member

zackkatz commented Jun 4, 2024

Approve Entries works for me as well using all layouts (Table, List, DataTables, DIY) @rafaehlers . What layout were you using?

@crbdev
Copy link

crbdev commented Jun 5, 2024

When adding a "Gravity Forms" widget to a View, the form does not render in the dashboard.

Entry approval worked for me, too.

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

4 participants