Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-10-25 23:59:38

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

[moot] textarea anchors in Write panel

I seem to be mostly editing long-form articles anymore, and while you guys have improved the Write panel by hundreds of miles since the old days, there’s one thing I’m noticing lately that I really wish I had available — a quick link from top of editor to Excerpt box.

As I think ahead to unlimited custom fields, where a person could have any number of textarea boxes in the Write panel for custom content types, the excerpt link could become a useful anchor links list just like the ‘Format’ menu.

In fact that’s probably a good way to design it:

_Body ⓘ_________________Jump to: Excerpt ▾_________________Format: Use Textile ▾_

When your articles start getting to be thousands of words long, and you play too much with your excerpt text like I do, inevitably, this little link becomes valuable.

Maybe in this case it’s more logical to reverse the positions?

_Body ⓘ_________________Format: Use Textile ▾_________________Jump to: Excerpt ▾_

Offline

#2 2018-10-26 08:16:39

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: [moot] textarea anchors in Write panel

Hmm, me thinks it adds additional (visual) complications on a page already packed with a variety of controls. And it would look really dense on smaller screens.

I assume you are using Hive admin theme with its endlessly growing body field, which I find pretty annoying in and by itself. When the page (not the <textarea />) has focus a quick Cmd+down-arrow will bring you to the end of the page, where the Excerpt field would be visible. But that is me…


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2018-10-26 08:35:44

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: [moot] textarea anchors in Write panel

I agree with Philippe regarding the number of controls. Although not quite the same thing, you could always use bot_wtc to shift the excerpt above the body field. Maybe that makes it easier for you given that the excerpt is by nature shorter. Otherwise Philippe’s key-combos or (shift-)tabbing could help.

Otherwise I rather like the self-expanding body field. It does make for long screens (like a lot of the rest of the web nowadays) but it gives you an idea of the overall text length which the scrolling pane never did.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2018-10-26 11:37:11

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Re: [moot] textarea anchors in Write panel

I like this growing text area in Hive, with an ability ^S to save my text on the spot — without leaving and jumping across fields to the [Save] button. Did you use [Tab] & [Shift] [Tab] to jump? This keyboard button always returns you to the last insertion point, where was your cursor while being edited. Or do you write long texts on a smartphone?

Offline

#5 2018-10-26 12:24:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: [moot] textarea anchors in Write panel

Another idea: You could probably add them yourself using bot_wtc’s ability to add a script to the write tab. Something like this:

$('.body .txp-textarea-options').prepend('<a href="#excerpt" style="padding-right:1rem;">Jump to Excerpt</a>');
$('.excerpt .txp-textarea-options').prepend('<a href="#body" style="padding-right:1rem;">Jump to Body</a>');

That should give you a “Jump to Excerpt” link in front of the markup chooser above the Body field and a “Jump to Body” link in front of the markup chooser above the Excerpt field.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2018-10-26 15:56:59

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [moot] textarea anchors in Write panel

Indeed, I’m using Hive at the moment, and I do like the growing body field, which works much better for me when text starts stacking up.

But I can see and appreciate the congestion concern, and using bot_write is a good idea. I’ve never used it before. Maybe now’s the time.

Offline

#7 2018-10-26 17:45:20

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: [moot] textarea anchors in Write panel

And if you just want to add some javascript to the head of your admin area, you can also add a file called “custom.js” to the theme. See the Hive readme. If you do that, you do need to make sure your javascript only applies to the right (write) panel or it will be applied everywhere.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2018-10-26 22:30:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [moot] textarea anchors in Write panel

FWIW, I’m not a massive fan of the autogrowing textarea on the Write panel. I’d far rather it had a fixed field height until you actually put the cursor in the box and/or started typing in it, then it grew to expand.

Doing that would mean a shorter page overall until such time as you showed intent to use a particular box, but I do appreciate this may be perceived as questionable UX. So the least intrusive approach for most users is probably as we have it now: a longer box from the outset and using shortcut keys to jump to the bottom of the page instead of a scrollbar in the box.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2018-10-27 07:11:55

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: [moot] textarea anchors in Write panel

Bloke wrote #314758:

FWIW, I’m not a massive fan of the autogrowing textarea on the Write panel. I’d far rather it had a fixed field height until you actually put the cursor in the box and/or started typing in it, then it grew to expand.

Doing that would mean a shorter page overall until such time as you showed intent to use a particular box, but I do appreciate this may be perceived as questionable UX.

Actually, that is not such a bad idea… If there is a way to configure that script to do that (expand the textarea on :focus, it might make it more likable (by me at least) – on larger screens at least. But where I’m not sure is on smaller screens (one column TXP UI).

Most of my writing / editing is done in BBEdit anyway; I’m experimenting with Ulysses on my iPad.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#10 2018-10-27 12:53:55

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [moot] textarea anchors in Write panel

Bloke wrote #314758:

I’d far rather it had a fixed field height until you actually put the cursor in the box and/or started typing in it, then it grew to expand.

When you have unlimited CFs, I’d expect that to be the case for all textarea fields in the write column, Body field too. Textareas about the height of a forum edit box here would be ideal, growing and springing open as you describe when clicked into.

Doing that would mean a shorter page overall until such time as you showed intent to use a particular box . . .

Yep.

[meanwhile] a longer box from the outset and using shortcut keys to jump to the bottom of the page instead of a scrollbar in the box.

I would certainly use a link to the Excerpt box.

Also, just remembering, would it be possible to fix the side bar controls, starting with the Sort and Display fieldset downward?

There’s always that moment where I’ve just made an excerpt edit, then decide I want to tweak the url-only title too… Another long swish, swish on the touch pad journey back up to the controls. Wouldn’t have to do that if they were fixed right there in the side. At least on laptop, which is the only place I ever login to an admin side, apparently.

I’m probably overlooking something about that though, or it’s an old topic decided against.

phiw13 wrote #314764:

Most of my writing / editing is done in BBEdit anyway; I’m experimenting with Ulysses on my iPad.

Yeah, I always draft outside Txp. Increasingly in Scrivner — headed for Linux support too, apparently nope, stopped the Linux effort in 2015 — where I can then produce other formats. Not without a lot of fingering, but it’s the most sensible process in my case. I’m still working it out. Shorter pieces are fine in iA Writer. If I knew how to edit or create TextMate bundles, I might use that instead of Writer for the Textile support, but the default Textile presentation handling sucks. I can’t stand it.

Last edited by Destry (2018-10-29 10:20:54)

Offline

#11 2018-10-27 13:17:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: [moot] textarea anchors in Write panel

phiw13 wrote #314764:

Actually, that is not such a bad idea… If there is a way to configure that script to do that (expand the textarea on :focus, it might make it more likable (by me at least) – on larger screens at least. But where I’m not sure is on smaller screens (one column TXP UI).

The problem I see here, is that it might not be able to remember the page’s position on save.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#12 2018-10-27 13:41:31

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: [moot] textarea anchors in Write panel

Destry wrote #314770:

Also, just remembering, would it be possible to fix the side bar controls, starting with the Sort and Display fieldset downward?

That would be … difficult and very messy. If you have a couple of the “twisty” boxes open, the side bar becomes long / longer than the viewport height, and the things at the bottom are maybe not accessible (at least not, unless you add scrollbars on it – @overflow: auto”). If you have overlay scrollbars, it is half OK, but e.g. on Windows, or macOS depending on you pointing device, scrollbars are always visible, then you end up with multiple scrollers which is jarring. Yet another layer of visual complexity on that busy panel. Imagine if you have multiple custom fields to make the side column ever longer.

colak wrote #314771:

The problem I see here, is that it might not be able to remember the page’s position on save.

Hmm, possible, I don’t know how that script works under the hood, actually. Keyboard shortcut (cmd / ctrl S) keeps the focus inside the textarea, but not everybody uses that.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB