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

[WIP] Single entry in lightbox #2055

Closed
wants to merge 15 commits into from

Conversation

zackkatz
Copy link
Member

@zackkatz zackkatz commented May 16, 2024

Most of the work is being done on includes/extensions/lightbox/.

To enable:

  1. Add a "Link to Single Entry" field
  2. Open field settings
  3. Check the "Open in a lightbox?" checkbox
  4. Save the View

Big things to work on

  • Allow for Next/Previous and Single Entry navigation options.
  • Remove the <— Go back link
  • Remove single entry widget header hooks add_action( 'gravityview/template/before', array( $this, 'render_widget_hooks' ) ); (started work here: class-gv-request-rest.php Request::is_entry())
  • When "open in lightbox" is enabled, disable "open in new window" option.
  • Make sure to embed Custom CSS and Custom JS output.
  • Enable galleries inside modal.
  • Prevent lightbox links from being indexed.
  • Edit Entry isn't working.
  • Add support for the CSS styles that are in Dashboard Views.

💾 Build file (5f5499e).

@mrcasual
Copy link
Collaborator

Closing in favor of work done in a separate PR.

@mrcasual mrcasual closed this Sep 11, 2024
@mrcasual mrcasual mentioned this pull request Sep 11, 2024
21 tasks
mrcasual added a commit that referenced this pull request Sep 25, 2024
_(work was initially done in
#2055

## To enable:

1. Add a "Link to Single Entry" field
2. Open field settings
3. Check the "Open in a lightbox?" checkbox
4. Save the View

![](https://i.gravitykit.com/i/LVnBFN+)

## Big things to work on:

- [x] Allow for Next/Previous and Single Entry navigation options.
- [x] Remove the `<— Go back` link
- [x] Remove single entry widget header hooks `add_action(
'gravityview/template/before', array( $this, 'render_widget_hooks' ) );`
(started work here: `class-gv-request-rest.php` `Request::is_entry()`)
- [x] When "open in lightbox" is enabled, disable "open in new window"
option.
- [x] Make sure to embed Custom CSS and Custom JS output.
- [x] Enable galleries inside modal.
- [x] Prevent lightbox links from being indexed.
- [x] Edit Entry isn't working.
- [ ] Add support for the CSS styles that are in Dashboard Views.

## Questions form #197 

* How do we handle updating data? When closing the lightbox, if an entry
has been edited, outdated values may be shown.
* Will Inline Edit work inside this? 🤯
  - If enabled, should we disable Inline Edit?

## To test:

- [x] **Single Entry link**
- [x] The link does not open in a lightbox when the corresponding field
option is not checked.
- [x] When "Open in a lightbox?" option is checked, the link opens in a
lightbox, allowing navigation left/right between entries.
  - [x] Edit Entry link opens inside the Single Entry lightbox view.
- [x] **Edit Entry link**
- [x] The link does not open in a lightbox when the corresponding field
option is not checked.
- [x] When "open in lightbox" is checked, the link opens in a lightbox,
allowing navigation left/right between entries.
  - [x] Updating the entry works.
- [x] After an update, "return to entry" opens the Single Entry layout
inside the lightbox. If it has an Edit Entry link, it should open inside
the lightbox.
  - [x] Deleting the entry works.
- [x] After deletion, the page should refresh or, if configured in the
View Editor under Delete Entry, URL redirection should work.
- [x] **Permissions**: only authorized users should be able to view,
edit and delete entries.

💾 [Build
file](https://www.dropbox.com/scl/fi/fdp5fvj9zm2usa8hmysik/gravityview-2.28.0-49301e324.zip?rlkey=xdty6oork78qputtuqm57bllq&dl=1)
(49301e3).
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.

2 participants