Skip to content

Misc fixes#447

Merged
azfoo merged 26 commits intodevfrom
misc-fixes
Apr 27, 2026
Merged

Misc fixes#447
azfoo merged 26 commits intodevfrom
misc-fixes

Conversation

@azfoo
Copy link
Copy Markdown
Collaborator

@azfoo azfoo commented Apr 22, 2026

29177d3 seems to resolve #428

@azfoo azfoo requested a review from FelipeDefensor April 23, 2026 20:17
azfoo and others added 3 commits April 24, 2026 01:26
Copy link
Copy Markdown
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

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

This is mostly approved. There is just one relevant bug for which I am working on a fix. Will push it tomorrow.

It would be good to address the comments, but it is not priority.

Comment on lines +308 to +312
return (
self.timeline.alter_levels(
self.elements_to_components(list(reversed(elements))), 1
)
and self._check_timeline_height()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see why _check_timeline_height would return a bool if we didn't need to make this line work. This is conciser, but the following would be more readable, and do without the _check_timeline_height return value:

result = self.timeline.alter_levels(...)
self._check_timeline_height()
return result

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't see why _check_timeline_height would return a bool if we didn't need to make this line work. This is conciser, but the following would be more readable, and do without the _check_timeline_height return value:

result = self.timeline.alter_levels(...)
self._check_timeline_height()
return result

Because doing return a() and b() means that if a() returns False, b() doesn't run and False is returned. Still, happy to rewrite.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, that's true, but the performance gain from not evaluating b() is negligible in this case, right? In any case, we could still do:

result = self.timeline.alter_levels(...)
if result:
    self._check_timeline_height()
return result

Comment on lines +321 to +324
return (
self.timeline.group(self.elements_to_components(elements))
and self._check_timeline_height()
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above.


return True

def _check_timeline_height(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This does more than check. A better name would be _adjust_timeline_height.

Copy link
Copy Markdown
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

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

Good to go from my part. Addressing the comments is optional. Review my changes before merging.

@azfoo azfoo merged commit e9c78f6 into dev Apr 27, 2026
11 checks passed
@azfoo azfoo deleted the misc-fixes branch April 27, 2026 13:15
Copy link
Copy Markdown
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

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

The capital letter already indicated the default on your implementation. I forgot about that convention, sorry. At least we have the option of setting a default now.

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.

2 participants