Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #26

Merged
merged 54 commits into from
Mar 24, 2020
Merged

update #26

merged 54 commits into from
Mar 24, 2020

Conversation

ThomasH99
Copy link
Owner

No description provided.

shannah and others added 30 commits February 23, 2020 14:23
…n be loaded from http urls, file system storage paths, and storage.
… These shouldn't introduce padding since they are there solely for structure and are implementation details - and the developer doesn't have access to change their padding.
…nent to still block lead in its parent hierarchy.
…ted on Label-like and Button-like components that can have icons. This allows the manipulation of components' icons in a more generic way. IconHolder includes methods like setIcon(), getIcon(), etc... . SelectableIconHolder includes methods for managing icons of the various states, e.g. setDisabledIcon(), etc...

Label and SpanLabel implement IconHolder.  Button, MultiButton, SpanButton, SpanMultiButton implement SelectableIconHolder.

Added support for styling icons differently than text in IconHolder components (e.g. Labels, Buttons, etc..).  This allows us to use a gray icon with black text, or to make the icon font size larger than the text.  The IconHolder interface setIconUIID(String) method is used for this purpose.  The icon styles can be obtained using the IconHolder getIconStyleComponent() which returns a component whose styles can be used for styling the icon.  By default, this method will return the IconHolder itself (e.g. the Button or Label itself), but in cases where setIconUIID(String) has been called, it will return a separate dummy component whose styles can be used.  FontImage has been adjusted to use these methods when creating icons for labels.

Additional methods have been added to FontImage for setting font icons on IconHolders.

Added support for state change events on Buttons (Button.add/removeStateChangeListener()).  Used this to implement Button#bindStateTo(Button) and Button#unbindStateFrom(Button) which allows a button to bind its state to another button, so when that other button is pressed, this button will enter the pressed state, etc..  This was necessary to implement state-ful icon methods in MultiButton since the icon is not the lead component, but we want to be able to add disabled buttons, and pressed buttons for them.  In MultiButton, the 'icon' component binds to the 'emblem' (which is the lead component) so that when the emblem is pressed, the 'icon' will display its 'pressed' icon, etc...
…nt as a safe area root so that safe area margins are calculated against its bounds for its child components. Forms are safe area roots by default, but other containers may be marked as roots to facilitate off-screen layout. There was an edge case, prior to this change, that caused jerk when sliding a side bar component on screen. When it was laid out off screen it didn't apply safe areas because it was off-screen. But once it is fully onscreen, safe areas get applied which causes a jerk. With this change it is possible to set the sidebar container as a safe area root so that the safe areas are applied in the initial layout before it appears on screen.

Also added support for a 'flags' attribute in UIFragment to add certain flags.  Support only for 'safeArea' flag currently, which marks a container as a safe area.
…like. Removes all margin and padding from a componnet. This is a very common requirement for containers that are 'internal' to help layout an outer container's children, and shouldn't have padding or margin applied.
…se case for this is when using a ComponentImage as the icon, the icon might actually contain text, it may, then, be advantageous to line up the baseline of the text in the icon with the text in the label.
…o obtain the safe area outside the context of a Form.
…em more manageable, and consistent with behaviour of regular components.
…NSData description method has changed so old method for converting device token to string doesn't work anymore. More on this here https://forums.developer.apple.com/thread/117545
shai-almog and others added 24 commits March 12, 2020 19:21
…omponent has a fixed preferred size. This would override the case where a parent component is scrollable when calculating the layout width and height for a container.
…t based on a selector string. Also added ComponentSelector.first() method to get only the first element of the found set.
…kge private class to encapsulate event handling on lead components. The general pattern is that if a lead component exists, all events are passed to the lead component. However, drag and drop on lead components is still handled in the lead parent. This was tricky since the pointer dragged and dragged finished events need to be delivered to the lead component, which then has to look up its lead parent itself to propagate logic for drag and drop and scrolling.
…ng the first time an interaction dialog is shown on a form.
…ort so that we don't need to generate 9-piece image borders for common CSS style patterns. With this commit, the CSS compiler will use the CSSBorder class for styles that have non-uniforms borders (e.g different widths, colors, or styles on different edges, or different border radiuses on different corners.).
…sposeWhenPointerOutOfBounds are now consumed so that other things aren't triggered when the user just wants to close an interaction dialog.
@ThomasH99 ThomasH99 merged commit 96e12d7 into ThomasH99:master Mar 24, 2020
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.

5 participants