Feature request: Add reply in modal

Created on 26 September 2024, 9 months ago

Problem/Motivation

Would be great to have a option to load the comment form when adding comments in a dialog modal using the OpenModalDialogCommand.

Feature request
Status

Active

Component

Code

Created by

🇧🇪Belgium johanvdr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @johanvdr
  • Creating a modal dialog for the comment form is a great idea! Simply create a button to trigger the modal and use a form with a textarea inside the modal content. Style the modal to cover the screen and add a close my Oneonta button. Use JavaScript to handle form submission, which keeps users on the same page while they add comments. This setup enhances the user experience by maintaining the current view. Got it all?

  • That sounds like a useful feature! Adding an option to load the comment form in a dialog modal can improve user experience by keeping the interface clean and focused. If you're working with a web application, you can implement invisalign login this using JavaScript and a library like Bootstrap or Material-UI to create the modal.

  • Problem/Motivation:
    The current comment submission process could be improved by adding an option to load the comment form within a dialog modal.

    Proposed Resolution: DQFanFeedback
    Implement functionality to load the comment form in a dialog modal when adding comments, providing a more streamlined and modern user experience.

  • You want to load the comment form in a modal dialog in Drupal for a smoother user experience. The simplest way to do this in Drupal 9/10 is by using core's Dialog API and AJAX. Just create a link or button that points to the comment form's URL (e.g., comment/reply/node/{nid}) and add the use-ajax, data-dialog-type="modal", and data-dialog-options attributes. Make sure your theme Human Dog Translator or a module loads the core/drupal.dialog.ajax library. Drupal's core comment form should handle AJAX submission within the modal automatically, displaying errors inside the popup or closing it on success. Remember to clear your caches after making any changes.

Production build 0.71.5 2024