decomp.me icon indicating copy to clipboard operation
decomp.me copied to clipboard

Add resize handle to textboxes on create scratch page

Open MegaMech opened this issue 3 years ago • 8 comments

This allows users to drag the box bigger so they can view as much text as desired.

MegaMech avatar Dec 05 '21 07:12 MegaMech

Could you clarify which textboxes you're referring to?

ethteck avatar Dec 05 '21 08:12 ethteck

Target assembly and context on the first page. Html textbox element has an on/off flag for enabling/disabling it.

MegaMech avatar Dec 05 '21 08:12 MegaMech

This would require extra complexity for the rich code textboxes (used on desktop platforms) - is there a particular use-case you want this feature for? Generally it's expected that a user will paste the target ASM and context from elsewhere and just hit go without editing it.

bates64 avatar Dec 06 '21 11:12 bates64

The notion of singular functionality is sort of naive. I took a look and it appears more complex than just turning css resize on (which is enabled by default). Textarea's are user resizable by default for a good reason. If it's not too difficult to fix it would most certainly be a most desirable change. But if the surrounding elements make the situation more complex than it is what it is I guess.

I had some quick changes I wanted to do in the edit box. Is that too much to ask?

What if I had edits I wanted for decomp.me that I didn't want in my code editor?

MegaMech avatar Dec 06 '21 20:12 MegaMech

Is that too much to ask?

No need to get defensive - alex is just asking about the motivation for the request.

I think having drag handles on these makes sense, by the way. What do you mean by "extra compexity" alex? can't we just have a toggle prop for the component that adds the handles here and not necessarily elsewhere? We don't need to worry about drag handles for the mobile version of the site, imo.

ethteck avatar Dec 07 '21 04:12 ethteck

The extra complexity I refer to is because we'd have to install a new dependency or write a chunk of code to implement (read: a fair chunk of JS) a resize handler for the monaco editor boxes used on the new scratch page when not on a mobile device (it's not like in CSS, where we just remove resize: no). This means that there can trivially be drag handles on mobile, but desktop requires a bunch of code. I'm not especially against it but I just wanted to know the motivations before working on such a feature :shipit:

bates64 avatar Dec 12 '21 13:12 bates64

What if I had edits I wanted for decomp.me that I didn't want in my code editor?

@MegaMech I was considering remaking the new scratch page to be more built-in to the decomp.me scratch editor at some point - e.g. to add context you open the context tab - which would make this an issue fixed by that, I think.

If @ethteck reckons this ^ would be a good idea then we can rename this issue to reflect the proposal

bates64 avatar Dec 12 '21 13:12 bates64

We could also just make the monaco editors larger on the create scratch page. I'm not sure how I feel about having the scratch creaton happen in the view scratch UI but I'll leave that till later to sort out

ethteck avatar Dec 13 '21 21:12 ethteck