Skip to content

Commit

Permalink
Merge branch 'disabled-button-menu-items'
Browse files Browse the repository at this point in the history
* Branch commit log:
  ui/b/menurow.js: update menu item description
  ui/b/menuitem.js: remove, use <button/> instead now
	This addresses #55 by now keeping a button inside a shadowRoot.
  ui/b/contextmenu.js: handle .isactive, disabled state, focus assignment
  ui/b/aboutdialog.js: use startViewTransition() to show dialog with async values
  ui/eslintrc.cjs: allow & in class attributes of lit elements
  ui/b/dialog.vue: add floating-dialog styling
  ui/theme.scss: fix CSS
  ui/mixins.scss: fix CSS
  ui/global.scss: fix CSS
  ui/b/filedialog.vue: fix CSS
  ui/Makefile.mk: fix dir dependency
  ase/memory.cc: change TODO comment
  ase/clapplugin.cc: change TODO comment
  ui/b/trackview.js: use render_contextmenu() and fix menu flicker
  ui/b/treeselector-item.vue: fix CSS
  ui/b/statusbar.js: use tailwind, fix height
  ui/b/menurow.js: use tailwind
  ui/b/propgroup.js: fix CSS
  ui/b/menubar.js: fix CSS
  ui/b/knob.js: fix CSS
  ui/b/icon.js: fix CSS
  ui/b/dialog.vue: fix CSS
  ui/b/devicepanel.vue: fix CSS
  ui/b/contextmenu.js: add render_contextmenu()
  ui/b/clipview.js: fix CSS
  ui/b/choiceinput.js: fix CSS
  ui/b/contextmenu.js: properly update buttons on attribute changes
  ui/b/contextmenu.js: fix CSS
  ui/dom.js: fix comment
  misc/version.sh: truncate extra long commit hash characters

Signed-off-by: Tim Janik <timj@gnu.org>
  • Loading branch information
tim-janik committed Mar 6, 2024
2 parents 64cc42b + ae9e5c5 commit db5b11a
Show file tree
Hide file tree
Showing 25 changed files with 214 additions and 383 deletions.
2 changes: 1 addition & 1 deletion ase/clapplugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ static void
host_rescan (const clap_host_t *host, uint32_t flag)
{
CDEBUG ("%s: %s", clapid (host), __func__);
// FIXME: implement host_rescan, this is a shorthand for all-params-changed
// TODO: implement host_rescan, this is a shorthand for all-params-changed
}

static const clap_host_audio_ports host_ext_audio_ports = {
Expand Down
2 changes: 1 addition & 1 deletion ase/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Arena::allocate (uint32 length, std::nothrow_t) const
Extent32 ext { 0, length };
if (fma->alloc_ext (ext))
return Block { fma->memory() + ext.start, ext.length };
// FIXME: try growing
// TODO: does it makes sense to try growing here?
return zeroblock;
}

Expand Down
2 changes: 1 addition & 1 deletion misc/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ read VHASH VDESCRIBE VDATE <<<' $Format: %H %(describe:match=v[0-9]*.[0-9]*.[0-9
VERSIONNUMBER=$(echo "${VDESCRIBE#v}" |
sed -e 's/-g[0-9a-f]\+$//i' \
-e 's/-\([0-9]\+\)$/.dev\1/') # strip ^v, -gCOMMIT, enforce .devNN
echo "$VERSIONNUMBER" "$VHASH" "$VDATE"
echo "$VERSIONNUMBER" "${VHASH:0:16}" "$VDATE"
2 changes: 1 addition & 1 deletion ui/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ UI/GLOBALSCSS_IMPORTS += $>/ui/spinner.scss
# == ui/global.css ==
ui/b/js.files := $(wildcard ui/b/*.js)
ui/tailwind.inputs := $(wildcard ui/*.html ui/*.css ui/*.scss ui/*.js ui/b/*.js ui/b/*.vue $(ui/b/js.files))
$>/ui/global.css: ui/global.scss $(ui/tailwind.inputs) ui/jsextract.js ui/stylelintrc.cjs $(UI/GLOBALSCSS_IMPORTS)
$>/ui/global.css: ui/global.scss $(ui/tailwind.inputs) ui/jsextract.js ui/stylelintrc.cjs $(UI/GLOBALSCSS_IMPORTS) | $>/ui/b/
$(QGEN)
$Q $(CP) $< $>/ui/global.scss
$Q node ui/jsextract.js -O $>/ui/b/ $(ui/b/js.files) # do node ui/jsextract.js $$f -O "$>/$${f%/*}"
Expand Down
12 changes: 8 additions & 4 deletions ui/b/aboutdialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Util from "../util.js";

// == HTML ==
const HTML = (t, d) => html`
<dialog class="floating-dialog" ${ref (h => t.dialog = h)} @cancel=${t.close_dialog} @pointerdown=${t.backdrop_click}>
<dialog class="floating-dialog [&:not([open])]:hidden" ${ref (h => t.dialog = h)} @cancel=${t.close_dialog} @pointerdown=${t.backdrop_click}>
<div class="dialog-header">
About ANKLANG
</div>
Expand All @@ -19,7 +19,7 @@ const HTML = (t, d) => html`
</dialog>`;
const INFOS_HTML = (t, d) =>
t.info_pairs.map (p => html`
<span class="min-w-[15em] col-start-1 pr-2 text-right align-top font-bold"> ${p[0]} </span>
<span class="col-start-1 min-w-[15em] pr-2 text-right align-top font-bold"> ${p[0]} </span>
<span class="col-start-2 whitespace-pre-wrap break-words"> ${p[1]} </span>
`);

Expand Down Expand Up @@ -51,15 +51,19 @@ export class BAboutDialog extends LitComponent {
}
updated (changed_props)
{
let info_promise;
if (changed_props.has ('shown') && this.shown) {
const load_infos = async () => {
this.info_pairs = await about_pairs();
this.requestUpdate(); // showModal with info_pairs
};
load_infos();
info_promise = load_infos();
}
if (this.shown && !this.dialog.open && this.info_pairs.length > 0) {
this.dialog.showModal();
document.startViewTransition (async () => {
this.dialog.showModal();
await Promise.all ([this.updateComplete, info_promise]);
});
}
if (!this.shown && this.dialog.open)
this.close_dialog();
Expand Down
2 changes: 1 addition & 1 deletion ui/b/choiceinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ b-choiceinput {
}
b-objecteditor &.b-choice {
text-align: left;
justify-content: left; text-align: left;
justify-content: left;
padding: 0;
flex: 1 1 auto;
}
Expand Down
2 changes: 0 additions & 2 deletions ui/b/clipview.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ b-clipview {
display: inline;
position: absolute;
padding: 3px;
position: absolute;
padding: 3px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
Expand Down
Loading

0 comments on commit db5b11a

Please sign in to comment.