Skip to content

Commit

Permalink
Merge pull request #565 from anvilistas/yaml-changes
Browse files Browse the repository at this point in the history
Yaml changes from anvil
  • Loading branch information
s-cork authored Oct 16, 2024
2 parents e8d97be + 332f65c commit fafb78d
Show file tree
Hide file tree
Showing 42 changed files with 753 additions and 2,430 deletions.
89 changes: 45 additions & 44 deletions .anvil_editor.yaml
Original file line number Diff line number Diff line change
@@ -1,67 +1,68 @@
unique_ids:
assets:
loading-spinner.js: GNN5BGLOS3BHSXWTHXXQUT5BPTJQEUXA
theme.css: S5NWY72JOUFUHCDRRQX7DV3C5CKF4TGN
forms:
Switch: '1621859715130702811176885.8342'
Slider: VQKM7U4OEOF6Y4PUA7EDRVABBMLBEHPP
MessagePill: 4HMQ4AYEDJT22I2YNFTDLCQCFDA4FZ3F
Autocomplete: BCY2XYD72YQ6XE35WSGDYNNDBRCSMYNV
Chip: JJUXHRHU5OMAZAT6Q3QT4K22KCL67Q4O
MultiSelectDropDown: HVA3ELK4BMIHXM33RHLUC5MR76GSTQ4G
PageBreak: WZMHYFGHS2XAT4DWAZNBJ77DOTUR2AIA
Tabs: REIFUFOHW7GVIYTAAVUTDZAKATHFJ5OW
Quill: ENPP7ERNGECFLY24YCU7S5PRQQHJEQ7V
ChipsInput: 2IUXJPHSKH5CW7WV2N2PTL2O6WAEWBPV
Demo: 7OHCYYNDEID2BZ5AN5DDP7K4XXGJTRZB
Autocomplete: BCY2XYD72YQ6XE35WSGDYNNDBRCSMYNV
ProgressBar.Determinate: J7HWVD2WBMZY7OCSOPNLPLHFQ4XCJBR2
MessagePill: 4HMQ4AYEDJT22I2YNFTDLCQCFDA4FZ3F
MultiSelectDropDown: HVA3ELK4BMIHXM33RHLUC5MR76GSTQ4G
PageBreak: WZMHYFGHS2XAT4DWAZNBJ77DOTUR2AIA
Pivot: XGSRYGA4QFP5H57CKNWXCVOT5H7DGTEV
ProgressBar.Determinate: J7HWVD2WBMZY7OCSOPNLPLHFQ4XCJBR2
ProgressBar.Indeterminate: KSULDKU4IPBMWPU7OQLLU4YN35XCYTSV
Quill: ENPP7ERNGECFLY24YCU7S5PRQQHJEQ7V
Slider: VQKM7U4OEOF6Y4PUA7EDRVABBMLBEHPP
Switch: '1621859715130702811176885.8342'
Tabs: REIFUFOHW7GVIYTAAVUTDZAKATHFJ5OW
modules:
utils._canvas_helpers: MTD3HIE254CV2SZVETZ3JVTYRAYNOU4I
zod: RZFAFJO5QAVW6DYK767PP6K4Q6RW44PJ
logging: S5KWHESKISS32MB7IU2QFOV4HX2AQVLN
zod.helpers.dict_util: COT4CLORPOYDFN5LQAHI7TLE4LEOYCC7
zod._types: VHGFA3C5XRZHGBL54WM5UC6RL4PM36BX
utils._component_helpers: '1621686339258612945000771.5087'
zod.helpers.parse_util: MTMR4K24CCBCYJRL4FNIHXNIHBFUZBH5
ProgressBar: 6RDMGEBZGTXV32KLZDKWPGBWXS3QKNRT
animation: S75G3LGMJ34O3EAGWYC3P7DJ43EXEKYG
augment: DXXSTVAMYSLYZJOQS23I7R67JNE3YDEQ
hashlib: ESOOTYM7EXMCRALJVLSMRRNA6NBMEEEJ
utils._writeback_waiter: HPGIMFEAETCBPEDMGJSTIJXSMGGV4LMU
logging: S5KWHESKISS32MB7IU2QFOV4HX2AQVLN
messaging: L6OUZBWTSWZU33JG4LAY36FYKSGCO7SS
navigation: YSGUSWEZXBEZEJKRIX7UPAS2Y64Q6EZ6
non_blocking: 7CBRUCMCCOTADTDVJD7557PLAAGH7WIO
storage: YCJGWKTKWGKIXPMF7R6FT2N5QH3TBETA
utils._view_transition: XMSCFAO2LMIYORYFGVUBISBGQPO4YEZQ
zod.helpers.regex: 6TKIA3ZVWVROGEI44JTNIC5TODN633FV
augment: DXXSTVAMYSLYZJOQS23I7R67JNE3YDEQ
persistence: GQD7FJ6KISTY5SMLFMOQU7ZJNZYQX6FI
popover: B6UIKKOXGZR7QK3ZO4P32GLP5AERNF3R
routing: 763MIXLEPUMGF6VS2I7VHTDMXSNANWA3
routing._alert: YOYXSYGZW45MSIHCYVJIZUTLLK5GI7WI
routing._decorators: DQ6XXMXDYQKYIFKYUWO345E3QKUMRZLF
routing._logging: FAODPTGNRUOWMQZKLALPJUT73LTMUDRI
routing._navigation: MXGZMA7IRSF5XJMMR4XOL4O2J7KNYSI4
routing._router: 4MPYU764AUYXJJ4G2735HYRHH6ZGY3L4
routing._utils: 4GKIPM2BN5MMDFMFNZ4LLASSCUTULE77
zod.locales.en: KGVCLBM4OXGV5YB6WRYK4JTMZ2GWE4XY
uuid: COAWBUSWZWBIJD75BBIBE7GAILKFICZF
animation: S75G3LGMJ34O3EAGWYC3P7DJ43EXEKYG
routing: 763MIXLEPUMGF6VS2I7VHTDMXSNANWA3
storage: YCJGWKTKWGKIXPMF7R6FT2N5QH3TBETA
theme: 7BUDDMPFDHKBJ6ZK57HMBCLTEDK3TENT
utils: E7XISEGXUVZXV24JEVFT4SV64AJED3XJ
utils._auto_refreshing: XM2GLNNTPYT25IMV2377R4PXTQCJE2SU
utils._timed: M2FMBJMUW4YW7ZZXZWEVMWV5PJQPEGTV
routing._alert: YOYXSYGZW45MSIHCYVJIZUTLLK5GI7WI
messaging: L6OUZBWTSWZU33JG4LAY36FYKSGCO7SS
popover: B6UIKKOXGZR7QK3ZO4P32GLP5AERNF3R
utils._canvas_helpers: MTD3HIE254CV2SZVETZ3JVTYRAYNOU4I
utils._component_helpers: '1621686339258612945000771.5087'
utils._deferred: MQYKKTWDCUB2X6F7M2VU456PGI2W6C3R
zod.locales: 7QZ6MHLHQRTP7KVX3DD6Y7SGUDKGG66M
navigation: YSGUSWEZXBEZEJKRIX7UPAS2Y64Q6EZ6
utils._deprecated: PNCWKP4H62LUWBLLXDIUVPZFBZBTPMQ5
utils._timed: M2FMBJMUW4YW7ZZXZWEVMWV5PJQPEGTV
utils._view_transition: XMSCFAO2LMIYORYFGVUBISBGQPO4YEZQ
utils._writeback_waiter: HPGIMFEAETCBPEDMGJSTIJXSMGGV4LMU
uuid: COAWBUSWZWBIJD75BBIBE7GAILKFICZF
zod: RZFAFJO5QAVW6DYK767PP6K4Q6RW44PJ
zod._types: VHGFA3C5XRZHGBL54WM5UC6RL4PM36BX
zod._zod_error: 3QAPNUDMOBJM3IWMPT5TKM5IYVJSINAB
zod.errors: NQVWFVCYKQRFA6SO3YJDAYYTE2UZS2X4
ProgressBar: 6RDMGEBZGTXV32KLZDKWPGBWXS3QKNRT
zod.helpers: 6U4KIDONQQT2K2CUHA6JVUKTFJ3IIJL7
routing._logging: FAODPTGNRUOWMQZKLALPJUT73LTMUDRI
routing._decorators: DQ6XXMXDYQKYIFKYUWO345E3QKUMRZLF
zod.helpers.dict_util: COT4CLORPOYDFN5LQAHI7TLE4LEOYCC7
zod.helpers.error_util: UGANBZYAAM3ZITSRAYOF5BJDA2SHJ4A3
routing._router: 4MPYU764AUYXJJ4G2735HYRHH6ZGY3L4
zod.helpers.parse_util: MTMR4K24CCBCYJRL4FNIHXNIHBFUZBH5
zod.helpers.regex: 6TKIA3ZVWVROGEI44JTNIC5TODN633FV
zod.helpers.util: JUQCMLBDYUSH62VH77OHE4MEIKPUSAXV
utils: E7XISEGXUVZXV24JEVFT4SV64AJED3XJ
utils._deprecated: PNCWKP4H62LUWBLLXDIUVPZFBZBTPMQ5
persistence: GQD7FJ6KISTY5SMLFMOQU7ZJNZYQX6FI
zod._zod_error: 3QAPNUDMOBJM3IWMPT5TKM5IYVJSINAB
zod.locales: 7QZ6MHLHQRTP7KVX3DD6Y7SGUDKGG66M
zod.locales.en: KGVCLBM4OXGV5YB6WRYK4JTMZ2GWE4XY
scripts:
fix_version: 5BGFRM42HGM3ODXODMOUG2DFE7CTUZOM
server_modules:
authorisation: Z6AZ64JBAAHAVRYQJ63VZLOU4TESTAUN
lazy_module_loader: CNBKKECWCHI3OMBLKR6JZG6J6KI45D55
serialisation: VBKY4WR2JYSA3V3HC3PTTRJWSHB2TBJR
server_utils: 4XEM7IGABFRXOMKOT7WB5BYR22LF4QH7
assets:
loading-spinner.js: GNN5BGLOS3BHSXWTHXXQUT5BPTJQEUXA
theme.css: S5NWY72JOUFUHCDRRQX7DV3C5CKF4TGN
scripts:
fix_version: 5BGFRM42HGM3ODXODMOUG2DFE7CTUZOM
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
## Bug Fixes
* popover - fix bug where popovers could not be used on forms using layouts
https://github.com/anvilistas/anvil-extras/issues/553
* ChipsInput - Chip close icon color is fixed for the last highlighted chip
https://github.com/anvilistas/anvil-extras/issues/567

## Breaking Changes
* classic editor - design components are no longer supported
https://github.com/anvilistas/anvil-extras/issues/567
* class-names and roles - all anvil extras components now use class names and roles prefixed with `ae-`
https://github.com/anvilistas/anvil-extras/issues/567

# v2.7.0 05-Sep-2024

Expand Down
20 changes: 10 additions & 10 deletions anvil.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
services:
- source: /runtime/services/tables.yml
client_config: {}
server_config: {}
startup: {type: form, module: Demo}
package_name: anvil_extras
allow_embedding: false
name: anvil_extras
runtime_options: {version: 2, client_version: '3', server_version: python3-full, server_spec: null}
db_schema: {}
metadata: {}
startup_form: Demo
name: anvil_extras
native_deps: {head_html: ''}
db_schema: {}
package_name: anvil_extras
renamed: true
runtime_options: {client_version: '3', server_spec: null, server_version: python3-full, version: 2}
services:
- client_config: {}
server_config: {}
source: /runtime/services/tables.yml
startup: {module: Demo, type: form}
startup_form: Demo
16 changes: 8 additions & 8 deletions client_code/Autocomplete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

_html_injector.css(
"""
.anvil-role-autocomplete {
.anvil-role-ae-autocomplete {
padding: 0 !important;
}
.anvil-role-autocomplete {
.anvil-role-ae-autocomplete {
position: absolute;
transform: scaleX(1) scaleY(1);
opacity: 1;
Expand All @@ -38,16 +38,16 @@
z-index: 3001;
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%);
}
.anvil-role-autocomplete.visible-false {
.anvil-role-ae-autocomplete.visible-false, .anvil-role-ae-autocomplete.anvil-visible-false {
transform: scaleX(0) scaleY(0);
opacity: 0;
display: block !important;
transition: all 200ms ease;
}
.anvil-role-autocomplete a {
.anvil-role-ae-autocomplete a {
padding: 7px 16px;
}
.anvil-role-autocomplete a:hover, .anvil-role-autocomplete a.anvil-role-active {
.anvil-role-ae-autocomplete a:hover, .anvil-role-ae-autocomplete a.anvil-role-ae-autocomplete-active {
background-color: #eee;
}
"""
Expand All @@ -67,7 +67,7 @@ def __init__(self, **properties):
self.init_components(**properties)

self._lp = _LinearPanel(
role="autocomplete",
role="ae-autocomplete",
spacing_above="none",
spacing_below="none",
visible=False,
Expand Down Expand Up @@ -129,7 +129,7 @@ def get_node_with_emph(text):
try:
self._active_index = self._active_nodes.index(prev_active)
self._active = prev_active
self._active.role = "active"
self._active.role = "ae-autocomplete-active"
except ValueError:
pass

Expand Down Expand Up @@ -202,7 +202,7 @@ def _on_keydown(self, e):
if self._active is not None:
self._active.role = None
if new_active is not None:
new_active.role = "active"
new_active.role = "ae-autocomplete-active"
self._link_height = (
self._link_height or _get_dom_node(new_active).clientHeight
)
Expand Down
66 changes: 33 additions & 33 deletions client_code/Autocomplete/form_template.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
container:
type: TextBox
event_bindings: {hide: _on_hide, show: _on_show}
properties: {}
event_bindings: {show: _on_show, hide: _on_hide}
is_package: true
type: TextBox
custom_component: true
events:
- {name: change}
- {name: suggestion_clicked}
- {default_event: true, name: pressed_enter}
- {name: focus}
- {name: lost_focus}
is_package: true
properties:
- name: suggestions
- default_value: []
name: suggestions
type: text[]
default_value: []
- {name: placeholder, type: string, default_value: ''}
- name: text
type: string
default_value: ''
allow_binding_writeback: true
default_binding_prop: true
- {default_value: '', name: placeholder, type: string}
- allow_binding_writeback: true
binding_writeback_events: [suggestion_clicked]
default_binding_prop: true
default_value: ''
group: text
important: true
- {name: enabled, type: boolean, default_value: true, group: interaction, important: true, designer_hint: enabled}
- {name: visible, type: boolean, default_value: true, group: appearance, important: true, designer_hint: visible}
- name: spacing_above
type: enum
options: [none, small, medium, large]
default_value: small
name: text
type: string
- {default_value: true, designer_hint: enabled, group: interaction, important: true, name: enabled, type: boolean}
- {default_value: true, designer_hint: visible, group: appearance, important: true, name: visible, type: boolean}
- default_value: small
group: layout
important: false
- name: spacing_below
type: enum
name: spacing_above
options: [none, small, medium, large]
default_value: small
type: enum
- default_value: small
group: layout
important: false
- {name: tag, type: object, group: user data, important: false}
- {name: suggest_if_empty, type: boolean, default_value: false}
- {name: foreground, type: color, default_value: '', default_binding_prop: false, group: appearance, important: false, description: Only applies changes to the TextBox}
- {name: background, type: color, default_value: '', default_binding_prop: false, description: Only applies changes to the TextBox, group: appearance, important: false}
- name: filter_mode
name: spacing_below
options: [none, small, medium, large]
type: enum
default_value: contains
options: [contains, startswith]
- {group: user data, important: false, name: tag, type: object}
- {default_value: false, name: suggest_if_empty, type: boolean}
- {default_binding_prop: false, default_value: '', description: Only applies changes to the TextBox, group: appearance, important: false, name: foreground, type: color}
- {default_binding_prop: false, default_value: '', description: Only applies changes to the TextBox, group: appearance, important: false, name: background, type: color}
- default_value: contains
description: How the autocompletion should filter suggestions
events:
- {name: change}
- {name: suggestion_clicked}
- {name: pressed_enter, default_event: true}
- {name: focus}
- {name: lost_focus}
name: filter_mode
options: [contains, startswith]
type: enum
15 changes: 5 additions & 10 deletions client_code/Chip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__version__ = "2.7.1"

_html_injector.css(
""".anvil-extras-chip{
""".ae-chip{
height: 32px;
font-size: 14px;
font-weight: 500;
Expand All @@ -32,16 +32,13 @@
position: relative;
}
.anvil-extras-chip i.anvil-component-icon.left {
.ae-chip i.anvil-component-icon {
font-size: 1.5rem;
}
.anvil-extras-chip a {
.ae-chip a {
user-select: none;
}
.anvil-extras-chip a .link-text {
padding: 0 !important;
}
.anvil-extras-chip span {
.ae-chip span, .ae-chip a > div {
padding: 0 !important;
}
"""
Expand All @@ -62,10 +59,8 @@
class Chip(ChipTemplate):
def __init__(self, **properties):
dom_node = self._dom_node = _get_dom_node(self)
dom_node.querySelector("script").remove()
dom_node.querySelector(".chip-placeholder").remove()
dom_node.addEventListener("click", lambda e: self.raise_event("click"))
dom_node.classList.add("anvil-extras-chip")
dom_node.classList.add("ae-chip")
dom_node.tabIndex = 0

self.close_link.set_event_handler(
Expand Down
Loading

0 comments on commit fafb78d

Please sign in to comment.