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

Hibiki v0.3.0 Release #4

Merged
merged 32 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
41eee78
minor updates to support new bulma component library. 'unwrap' attri…
sawka Feb 6, 2022
0f8c30f
add hibikiversion attribute to library -- allow them to require a cer…
sawka Feb 6, 2022
1da6aab
fix bug with false values on class attributes
sawka Feb 7, 2022
d4c213f
checkpoint, bulma control library
sawka Feb 7, 2022
93a56b4
ChildrenVar.filter, special invoke expression for filtering nodes by …
sawka Feb 7, 2022
3110ade
make if, if-break, condition attribute consistent in how they handle …
sawka Feb 7, 2022
9a1016f
After testing, change ChildrenVar.empty to ChildrenVar.size. empty d…
sawka Feb 7, 2022
dff82dd
remove unused InjectedAttrsObj.styleMap, and add merge function
sawka Feb 7, 2022
d482899
big behind the scenes change. children of custom components are now …
sawka Feb 8, 2022
5e0febd
fix mobx issue where defaults/define-vars was updating state during r…
sawka Feb 8, 2022
40c317d
move welcome message and source code link from nodes.tsx to main hibi…
sawka Feb 8, 2022
25644fc
only call event.preventDefault for clicks/submits when href/action at…
sawka Feb 8, 2022
d8e1b1d
Re-License Hibiki HTML under MPL 2.0 (OSI approved)
sawka Feb 8, 2022
15546ba
updates to hibikihtml homepage
sawka Feb 8, 2022
947498c
Next version will be 0.3.0 (because of license change)
sawka Feb 9, 2022
b84180f
Parse define-vars, datacontext, and componentdata blocks once in html…
sawka Feb 9, 2022
98aefe7
fix bug where component local event handlers did not see context vars…
sawka Feb 9, 2022
746d872
components now fire 'mount' event internally (can be caught with defi…
sawka Feb 9, 2022
dd64a33
grammar change to allow functions to receive named call params plus d…
sawka Feb 9, 2022
dd77adf
added new spaceship '<=>' operator for comparisons. added fn:upperca…
sawka Feb 10, 2022
118a514
new fn:compare, lots of options for comparing hibiki values, locale, …
sawka Feb 10, 2022
65debac
added fn:sort (with option to sort as references). also add a lot mo…
sawka Feb 10, 2022
686c5c1
fn:slice can now slice an array and return references to the original
sawka Feb 11, 2022
26f3758
really technical change that allows sub-references to be created from…
sawka Feb 11, 2022
6499d65
add slice and sortexpr parameters to fn:sort
sawka Feb 11, 2022
28aed35
fix 'if' attribute on h-children (foreach is not allowed). make noat…
sawka Feb 11, 2022
f649c26
bugfix, check fn:sort#sortexpr against noattr
sawka Feb 11, 2022
0b8fa70
remove dev build externals -- not worth the build complexity
sawka Feb 11, 2022
a34d7d9
small cleanups on playground/tutorial. no longer use children.all, j…
sawka Feb 11, 2022
12912e0
pass parentHtmlTag through all react nodes to eliminate rediculous re…
sawka Feb 11, 2022
a2159d4
clean up core library, removed redundant nodes
sawka Feb 12, 2022
6ccd7a9
update playground to link to versioned hibiki js (easier testing/depl…
sawka Feb 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
only call event.preventDefault for clicks/submits when href/action at…
…tributes are not present or set to '#'
  • Loading branch information
sawka committed Feb 8, 2022
commit 25644fcfcaf53ca06f6f41b1f862d0bf63be8d15
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* added ChildrenVar.node (first node of ChildrenVar)
* added ChilcrenVar.nodes (array of node objects)
* added innerhtml and outerhtml to node var
* updated when welcome message and usage ping to fire on library load. can be suppressed using HibikiGlobalConfig
* updated click and submit handlers to only automatically call event.preventDefault() when the href or action attributes are not present or set to "#".
* bugfix: class.[class] was not being properly set to false when set to the Hibiki value false
* bugfix: and/or operators were not correctly evaluating 'noattr' as false
* bugfix: fix component defaults, define-vars, and h-withcontext, to never update mobx state
Expand Down
12 changes: 10 additions & 2 deletions src/dbctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,12 @@ class DBCtx {
}

@boundMethod handleOnSubmit(e : any) : boolean {
e.preventDefault();
if (e != null) {
let actionAttr = this.resolveAttrStr("action");
if (actionAttr == null || actionAttr === "#") {
e.preventDefault();
}
}
let formData = new FormData(e.target);
let paramsPromise = convertFormData(formData);
paramsPromise.then((params) => {
Expand All @@ -642,7 +647,10 @@ class DBCtx {

@boundMethod handleOnClick(e : any) : boolean {
if (e != null) {
e.preventDefault();
let hrefAttr = this.resolveAttrStr("href");
if (hrefAttr == null || hrefAttr === "#") {
e.preventDefault();
}
}
this.handleEvent("click");
return true;
Expand Down