`:AddText()`s and `AddTitle()`s don't trigger reflows on deletion

Open Beginner friendly
#28 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
frontend

Research direction

Start by locating the AddTitle and AddText implementations and their Destroy paths, then compare them with other AddFoo components that already recompute layout on destruction. Reproduce with the provided panel snippet and check where the container layout is invalidated or reflowed. Done means destroying a title or text before adding a button leaves no tall margin and the panel layout recomputes correctly.

Written by the indexing model from the issue text.

Description

bug

Unlike all other items returned from :AddFoo(), these don't recompute the container's layout when :Destroy()ed.

e.g. Pick a panel or something and do the following:

local title = panel:AddTitle("Hello")
title:Destroy()
panel:AddSimpleButton("there")

The button will have what looks like a very tall margin above it.

Dominant language
Lua
Stars
6
Forks
4
Avg merge
2d 7h
Merged PRs (30d)
18

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PrettyRS/prettyui

All issues in PrettyRS/prettyui

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.