Skip to content

Conditional Rendering and Query Input Settings#750

Merged
johbaxter merged 28 commits intodevfrom
conditional-rendering-of-block
Mar 28, 2025
Merged

Conditional Rendering and Query Input Settings#750
johbaxter merged 28 commits intodevfrom
conditional-rendering-of-block

Conversation

@bannaarisamy-shanmugham-kanini
Copy link
Copy Markdown
Contributor

Description

Create a option to show and hide a block based on static true or false, with variables to decide its visibility

Changes Made

Worked on most of blocks to provide option for showing/hiding the blocks based on custom need.

How to Test

  1. Drag and Drop a button/accordion/input block into page
  2. In the right side of page, on block settings change Show Block field to change the visiblity of a block

Notes

@bannaarisamy-shanmugham-kanini bannaarisamy-shanmugham-kanini requested a review from a team as a code owner March 24, 2025 14:16
@bannaarisamy-shanmugham-kanini bannaarisamy-shanmugham-kanini linked an issue Mar 24, 2025 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely on the right track.

we should clean up the code on what we render.

And a function that either returns true or false. call it showBlock that includes the stringToBoolean switch case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will work on your suggestion and update here.

Copy link
Copy Markdown
Contributor

@johbaxter johbaxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't commit your lock file

@bannaarisamy-shanmugham-kanini
Copy link
Copy Markdown
Contributor Author

Reg, QueryInputSettings.tsx file changes I have committed my changes in following branch: QueryInputSettings change
Please suggest me if any further changes are needed.

@johbaxter
Copy link
Copy Markdown
Contributor

johbaxter commented Mar 25, 2025

Query Input Settings

@Paulson-Robert and @bannaarisamy-shanmugham-kanini merging this branch into here.

Will have you address fixes listed in comments

@johbaxter johbaxter changed the title Conditional rendering of block Conditional Rendering and Query Input Settings Mar 25, 2025
@johbaxter
Copy link
Copy Markdown
Contributor

johbaxter commented Mar 25, 2025

As far as my first round of initial testing of conditional rendering it does the job. @bannaarisamy-shanmugham-kanini

We need to:

  • clean up the code in RendererEngine for readability.

We also likely need to be able to:

  • parse 0 and 1 to boolean values in RenderEngine
  • parse True and False from python cell

Please commit directly to this branch. "conditional-rendering-of-block"

May be good to test with this:
blocks.json

@johbaxter
Copy link
Copy Markdown
Contributor

johbaxter commented Mar 25, 2025

@Paulson-Robert

I think we are taking the right foot forward, on the QueryInputSettings, but i def think we are going to need some better interaction on it.

It accomplishes the thing we asked for, as far streamlining variable creation, and has some autocomplete functionality that i like on it as well (buggy)

image

  • Fix the placeholder text (look at screenshot, do not make any suggestions until the user has focused into text field)
  • Only allow one accordion to be open in Menu (better ux)
  • Fix the label for cell-prop and notebook-prop, change to Notebook Properties and Cell Properties
  • Fix the order of the menu ["Block", "Notebook", "Cell", "Notebook Properties", "Cell Properties", ...everything else]
  • Fix tab autocomplete bug when pulling in suggestion
  • When hovering over block options in the QueryInputSettings Menu, designer.setHovered('block-id')
  • Stretch Goal: When hovering over cell options, show visual indicator on the hovered cell, additions on notebook store??

Please commit directly to this branch. "conditional-rendering-of-block"

@ehynd ehynd linked an issue Mar 26, 2025 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown
Contributor

@johbaxter johbaxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff guys

@johbaxter johbaxter merged commit 04caf41 into dev Mar 28, 2025
3 checks passed
@johbaxter johbaxter deleted the conditional-rendering-of-block branch March 28, 2025 18:58
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /update_changelog

@QodoAI-Agent
Copy link
Copy Markdown

Changelog updates: 🔄

2025-03-28

Added

  • Enabled conditional block rendering via a new configurable "show" field.
  • Improved query input settings with dynamic suggestion and variable support.

to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'

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.

Conditional Rendering for Blocks QueryInputSettings - show all blocks/notebooks/cells in list even if not variable

4 participants