Skip to content

36 removing textboxes#49

Open
ndpya wants to merge 3 commits intomainfrom
36-removingTextboxes
Open

36 removing textboxes#49
ndpya wants to merge 3 commits intomainfrom
36-removingTextboxes

Conversation

@ndpya
Copy link
Copy Markdown
Collaborator

@ndpya ndpya commented Nov 13, 2025

Pull Request Template

Pulled template from here

Title

Textboxes are deleted when content is the same across all textboxes

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

Added two new methods (compareAll() and removeTextboxes()) to TextboxesManager.ts. compareAll() is used in the update() function in the case when an edit is made inside a textbox, checking if the edit caused all textboxes to have the same content. If so, removeTextboxes() is called to delete textboxes visually and in memory, updating the template content and

Testing

I tested with smaller cases (~3 snippets) and with making changes to the textboxes across multiple snippets. I still need to test with special cases (empty textboxes, removals, complex edits) but first I need to address a bug where textboxes have incorrect ranges at times.

Impact

It will be easier for users to detect where diffs/parameters are in the snippets/templates now that old textboxes that have the same content are removed.

Additional Information

[Any additional information that reviewers should be aware of.]

Checklist

  • [X ] My code adheres to the coding and style guidelines of the project.
  • [X ] I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • [X ] My changes generate no new warnings

@github-actions
Copy link
Copy Markdown

Binder 👈 Launch a Binder on branch ucsd-salad/aspen/36-removingTextboxes

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