Canvas Documentation
v4.1
v4.1
  • Introduction
  • Key Features
  • What's New
  • Canvas Design System Figma File
  • CANVAS FUNCTIONALITY
    • Getting Started
    • Branding & Design
    • Marketing Pages
    • Bubble Pages & Blocks
    • Roles & Permissions
    • Menus & Navigation
    • Data & Workflows
    • Emails & Alerts
      • Mail merge terms
    • Privacy rule checker
    • Miscellaneous
      • Setting up two factor authentication
      • Cookie and consent banner
      • Setting your password policy
      • Set up Payment info on Account page
      • Loading screen
      • Configuring multiple languages
      • Customizing your app's portal page colors
    • Reference
      • Pages
        • Index
        • Admin Portal
        • Account
        • Login
        • Legal
        • Reset Password
        • 404
      • Reusable elements
        • Header
        • Footer
        • Signup & Login
        • Cookies Permission
        • Widgets
          • App security
          • Header Widgets
          • Workflow Widgets
        • Admin Portal
          • Admin analytics
          • Admin email & templates
          • Admin header & footer
          • Admin legal popups
          • Admin branding, launch, and settings
          • Admin marketing pages
          • Admin portal canvas logic
          • Admin options settings
        • Menu Focus Elements
      • Data types
      • Option Sets
      • Backend Workflows
      • Design standards
        • Manually Building UI
  • Bubble Best Practices
    • Learning Bubble Basics
    • Principles
    • Database
    • Design
    • Security
    • SEO
    • Speed
    • Modularity
      • Data triggers
  • Canvas library
    • Page templates
      • Free Bubble Marketing Page
      • Premium Bubble Marketing Page
      • Centered Profile Page
      • Left-Justified Profile Page
      • Standard page
      • Toggle Tabs Page
      • Menu Page
      • Mobile Menu Page
      • Video List Page
      • Standard Portal / Dashboard Page
      • Simple Portal / Dashboard Page with Icons
      • Double Sidebar Portal Page Template
      • Search Page
      • Map Search Page with Toggle and Filters
      • Floating Map Search Page
      • Search Bar Page
      • Multi-Step Page With Progress Bar
      • Standard Multi-Step Process Page
      • Multi-Step Process Page with Sidebar
      • Gallery Profile or Product Page
      • Sidebar Profile Page
      • 2-Column Menu Tabs Page
      • 2-Column Checkout Page
      • 2-Column Video Chat Page
      • Vertical Multi-Step Page Template
    • Blocks
      • Monthly Calendar Scheduling Widget
      • No Reply Comments Thread
      • Nested Comments Thread (with Like and Reply)
      • Placeholder Group
      • List with Circular Progress Bar Repeating Group
      • Top Input Chat Widget
      • Bottom Input Chat Widget
      • Toggle Tabs Group
      • Single-Select or Multi-Select Pill Tabs Group
      • Settings group
      • To-Do List Repeating Group
      • Title Group with Button and Filters
      • Product Details Group With Progress Bar
      • Listing details with Icons and Menu Focus Group
      • Week Daily Availability Group
      • Frequently Asked Questions (FAQ) Repeating Group
      • Dismissible Module
      • Video Group
      • About Group
      • Add to Cart Group
      • Full Width Map with Directions Link
      • Location Module (Map and Directions)
      • Drag and Drop Repeating Group
      • Infinite Columns Horizontal Scroll Data Table with Fixed First Column
      • Expiration timer
    • Popups
      • Confirmation Popup
      • Message Popup
      • Image Popup
      • Video Popup
      • Vertical Scroll Popup
      • Edit Popup
      • Standard Form Popup
      • Subscribe Popup
      • Feedback / Contact Popup
      • Details Popup
      • Add List Popup
      • Advanced Form Popup
      • Rating Popup
      • Toggle Tabs Popup
      • Share Popup
      • Multi-Step Popup
      • Invoice Popup
      • Stripe Credit Card Purchase Popup
      • View Profile Popup
      • Send Message Popup
      • Multi-Select Pill Tabs Popup
      • Pricing Plans Popup
    • Reusables
      • Multimage uploader
Powered by GitBook
On this page
  • Overview
  • Structure
  • How to set up

Was this helpful?

  1. Canvas library
  2. Blocks

Nested Comments Thread (with Like and Reply)

Use this when the ability to like and reply to comments is needed.

PreviousNo Reply Comments ThreadNextPlaceholder Group

Last updated 2 years ago

Was this helpful?

Overview

This block contains a list of comments created by different users. Each user can create a new comment, reply to, or like a parent comment. This block (and its comments database object) can be connected to any data object in your database (e.g., a topic, a product, or a post). Admins (or users with admin access) can manage the comments section by hovering over a comment and clicking on the ellipsis menu to delete the comment. By default, the widget allows for three levels of comments.

Structure

When this block is added to a page, it is placed within a group called Blocks container 860 (do not rename) on the page. This group contains the responsive settings for all blocks.

  • nestedcomments_template This reusable element contains all of the logic and UI for the nested comments module. It contains four main groups:

    • Group Parent message input This group contains the multiline input for posting a parent Comment. Clicking on Button Parent POST will most the text in MultilineInput Parent Comment as a parent Comment.

    • RepeatingGroup Parent comment This repeating group displays all parent comments posted by users (where the parent comment is empty).

      • RepeatingGroup Child comment displays all children comments (where the parent comment is parent group's comment).

      • Clicking on Text Parent reply button will show Group Child message input_t-comment and allow the user to reply to a parent comment.

        • Clicking on Button Child Reply will post the comment underneath the parent Comment.

      • Clicking on Text Parent like button and Text Child like button will show Popup likes.

      • Clicking on Group Parent fav comment_t-comment or Group Child fav comment_t-comment will like/unlike the comment.

      • Clicking on Group Parent menu_t-comment and Group Child menu_t-comment will show a menu to delete a Comment.

        • You should add another statement to the existing conditional statements on these groups: ...and Current user's Role is App Admin

    • Group Main no comments This group will be visible when RepeatingGroup Parent comment's list of comments count is 0.

    • Popup Likes This popup shows a list of users who have liked a comment.

How to set up

  • Add a field to the Comment data type that represents the object on which you want users to comment. For example, if you want users to comment on products, you should add a Product field.

  • Make a copy of the nestedcomments_template reusable. This preserves the original reusable element aded by the extension, incase you need to link comment functionality to multiple data types within your application.

  • Modify the copied reusable's type of content from empty to the custom object for which you want to show comments. For example, if you are building a marketplace where Users can comment on different Products, you could make the copied reusable's group type Product.

  • Next, we can add a "Product" field (type: Product, list: no) to the "t-Comment" data type, and modify the data source for RepeatingGroup Parent comment to include any needed filters. In the marketplace example, the data source will display comments that are linked to the Product object that is the data source of the reusable.

  • Modify the three actions that run when the Button Parent POST, Button Child REPLY (second level), and Button Child REPLY (third level) elements are clicked to link theComment created to the relevant object. In this example, we are linking the Product that's displayed in the reusable to each Comment by storing the Product object in each Comment's Product field.

Button Child REPLY (second level)

Button Child REPLY (third level)

Button Parent POST

  • Add a data source whenever you use the nestedcomments_template reusable element as an instance on a page.