Skip to content

PressTarget#129

Open
maxwell-jordan wants to merge 5 commits into
mainfrom
feature/press-target
Open

PressTarget#129
maxwell-jordan wants to merge 5 commits into
mainfrom
feature/press-target

Conversation

@maxwell-jordan

Copy link
Copy Markdown
Contributor

Adds ui/press-target.mod, a basic component wrapper to add a press composer and limited press related functionality to a component

@maxwell-jordan maxwell-jordan requested a review from marchant June 16, 2026 00:59
Comment thread ui/press-target.mod/press-target.js Outdated
*
* @event PressTarget#action
* @property {Map} detail - The detail object as defined in {@link AbstractControl#detail}
*/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be removed?

Comment thread ui/press-target.mod/press-target.js Outdated
*
* @event PressTarget#longAction
* @property {Map} detail - The detail object as defined in {@link PressTarget#detail}
*/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be removed?

Comment thread ui/press-target.mod/press-target.js Outdated
* @class PressTarget
* @extends Component
*/
var PressTarget = exports.PressTarget = Component.specialize( /** @lends PressTarget.prototype # */ {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should use native extends ES class syntax for new content going forward

Comment thread ui/press-target.mod/press-target.js Outdated

/**
* @class PressTarget
* @extends Component

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't realize earlier but looking the PR, I think PressTarget should probably be a subclass of Control rather than Component directly, it should mean less code, like managing active state

detail: {
get: function () {
if (this._detail === null || this._detail === undefined) {
this._detail = new Map();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we create an empty map here by default?

* @returns {Map}
*/
detail: {
get: function () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's no setter for details? We need a teach anyway, but that's also what it's for, how to use things

Comment thread ui/button.mod/button.js Outdated
@@ -256,11 +256,11 @@ const Button = (exports.Button = class Button extends Control {
* @default 1000
*/
get holdThreshold() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is inherited, shouldn't be necessary here

Comment thread ui/button.mod/button.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should move to ActinoTarget, I had already mentioned it in the daily meeting

Comment thread ui/button.mod/button.js Outdated
super.holdThreshold = value;
}

__pressComposer = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should move to ActinoTarget, I had already mentioned it in the daily meeting

Comment thread ui/button.mod/button.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should move to ActinoTarget, I had already mentioned it in the daily meeting

Comment thread ui/button.mod/button.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should move to ActinoTarget, I had already mentioned it in the daily meeting

Comment thread ui/button.mod/button.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should move to ActinoTarget, I had already mentioned it in the daily meeting

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