Skip to content

feat(torin): Add layout order#1968

Open
TBX3D wants to merge 3 commits into
marc2332:mainfrom
TBX3D:feat/torin-reverse-directions
Open

feat(torin): Add layout order#1968
TBX3D wants to merge 3 commits into
marc2332:mainfrom
TBX3D:feat/torin-reverse-directions

Conversation

@TBX3D

@TBX3D TBX3D commented Jun 21, 2026

Copy link
Copy Markdown

Closes #1796

Adds a new order attribute to torin's layout node, by default its set to forward, but can be changed to backwards.

Add `Direction::HorizontalReverse` and `Direction::VerticalReverse`, which
stack children along the same axis in reverse order so a layout can be
reversed without reordering its children.
@TBX3D
TBX3D requested a review from marc2332 as a code owner June 21, 2026 21:18
@marc2332

marc2332 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Sure thing pal (bot)

@marc2332 marc2332 closed this Jun 21, 2026
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.68473% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.35%. Comparing base (74a6d2a) to head (95009b0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/freya-core/src/elements/extensions.rs 0.00% 12 Missing ⚠️
crates/torin/src/values/order.rs 21.42% 11 Missing ⚠️
...tes/freya-devtools-app/src/components/attribute.rs 0.00% 1 Missing ⚠️
crates/freya-devtools/src/node_info.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1968      +/-   ##
==========================================
+ Coverage   61.17%   61.35%   +0.18%     
==========================================
  Files         331      333       +2     
  Lines       43106    43375     +269     
==========================================
+ Hits        26370    26614     +244     
- Misses      16736    16761      +25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TBX3D

TBX3D commented Jun 21, 2026

Copy link
Copy Markdown
Author

hey @marc2332, all of your code is generated by claude, so quit projecting. What a bot.

@marc2332

marc2332 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

hey @marc2332, all of your code is generated by claude, so quit projecting. What a bot.

I don't know where you take that from, I started this project before Claude was even created. Your account shows signs of massive vibecoded PRs spam in other projects, if you find this to be wrong please open a new PR with your changes.

@marc2332

Copy link
Copy Markdown
Owner
image

@TBX3D

TBX3D commented Jun 21, 2026

Copy link
Copy Markdown
Author

Tell me what exactly is the problem with this code. Does it not work? Do you not want it? Do you not want to read the commits? Make yourself clear.

@marc2332

Copy link
Copy Markdown
Owner

I don't want to waste my time reviewing code that was vibe coded (different from relying on AI). Your account activity does not inspire me confidence, therefore I decided it was not worth my time.

@TBX3D

TBX3D commented Jun 21, 2026

Copy link
Copy Markdown
Author

Your complaint seems to fall under Goodhart's law of useless metrics. I did plenty testing of the code.

@marc2332

Copy link
Copy Markdown
Owner

As a sign of good gesture I will review the code soon, but again, your account activity is nothing but unusual.

@marc2332 marc2332 reopened this Jun 21, 2026
@TBX3D

TBX3D commented Jun 21, 2026

Copy link
Copy Markdown
Author

Thank you.

Comment thread crates/torin/src/values/direction.rs Outdated
Comment on lines +8 to +11
/// Stack children vertically, in reverse order.
VerticalReverse,
/// Stack children horizontally, in reverse order.
HorizontalReverse,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I would have rather added a flag to Vertical and horizontal

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I am not even sure if Direction is the right api to touch.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Virtual Scrollview doesnt work with the reversed direction.

There is still an IF comparing to Direction::vertical(), but even if you fix that it s still broken because the children need to be reversed.

@marc2332

Copy link
Copy Markdown
Owner

I'll take over this PR

@marc2332 marc2332 self-assigned this Jun 24, 2026
@marc2332 marc2332 changed the title feat(torin): Add reverse directions feat(torin): Add layout order Jun 24, 2026
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.

enhancement: Add a Direction::HorizontalReverse/Direction::VerticalReverse

2 participants