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

feat: add button and input element support to toolbar #938

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Add Button and Input Element Support to Toolbar

Changes

  • Added Button and Input elements to toolbar dropdown menu
  • Updated INSERT_DIV mode to INSERT_ELEMENT for better extensibility
  • Implemented drag-and-drop functionality for new elements
  • Added default styling and properties for buttons and inputs
  • Added up chevron dropdown menu to toolbar UI

Implementation Details

  • Updated models.ts to support new element types (Button, Input)
  • Modified insert/index.ts to handle different element types with specific styling
  • Enhanced toolbar UI with dropdown menu and new element options
  • Maintained compatibility with existing text tool and hotkeys

Testing Notes

Environment Issue: Local development environment is missing GTK library (libgtk-3.so.0). Please test the following in your environment:

  1. Toolbar UI

    • Up chevron appears next to square icon
    • Dropdown menu shows Button and Input options
    • Chevron width is half of square icon width
  2. Drag and Drop

    • Drag Button/Input from toolbar to page
    • Click to select and place elements
    • Default styling applied correctly
  3. Element Properties

    • Buttons have default padding, background color
    • Inputs have default width, border styling
    • Text content preserved appropriately

Link to Devin run

https://app.devin.ai/sessions/4df3da1e8be044ffb32fe2564ac4f0c9

- Add Button and Input elements to toolbar dropdown
- Update INSERT_DIV mode to INSERT_ELEMENT
- Implement drag-and-drop functionality for new elements
- Add default styling and properties for buttons and inputs
- Maintain compatibility with existing text tool
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant