Skip to content

Conversation

@darrenburns
Copy link
Member

@darrenburns darrenburns commented Dec 20, 2022

image

@darrenburns
Copy link
Member Author

TODO @darrenburns : Link to rich-pixels - mentioned library but not linked to it or said name of it.

@darrenburns darrenburns marked this pull request as ready for review December 21, 2022 10:45
@@ -0,0 +1,171 @@
---
draft: true
Copy link
Member Author

Choose a reason for hiding this comment

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

Have left this as a draft for now.

Comment on lines +64 to +68
Textual forgoes the z-index concept from browser CSS and instead uses a “named layer” system. Using the `layers` property you can defined an ordered list of named layers, and using the `layer` property, you can assign a descendant widget to one of those layers.

By creating a new layer above all others and assigning a widget to that layer, we can ensure that widget is painted above everything else.

In order to determine where to place the dropdown, we can track the current value in the dropdown by `watch`ing the reactive input “value” inside the Input widget. This method will be called every time the `value` of the Input changes, and we can use this hook to amend the position of our dropdown position to accommodate for the length of the input value.
Copy link
Member Author

@darrenburns darrenburns Dec 21, 2022

Choose a reason for hiding this comment

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

I feel this part might be a bit jarring - I randomly start going into a bit too much implementation detail. Maybe I should talk a bit more about Shira and the functionality of the autocomplete library at a high level instead.

Copy link
Member

Choose a reason for hiding this comment

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

Think I'll be publishing on Sunday. I think this is great, but feel free to PR edits before then if you like.

Copy link
Member Author

Choose a reason for hiding this comment

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

@willmcgugan Should I set draft: false now or will you do it?

Copy link
Member

Choose a reason for hiding this comment

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

I'll do it.

@willmcgugan willmcgugan merged commit 9fbad7f into main Dec 21, 2022
@willmcgugan willmcgugan deleted the darren-blog-year-in-review branch December 21, 2022 13:17
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.

3 participants