Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2020-05-13 11:35:07

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

Re: [feedback] Image upload directly in the write tab

On the heels of the add button state remembering commit there’s a subtle issue with the arrow alongside the link.

If the state is closed when the page loads, all’s well. It toggles fine.

If the state is open, however, the plugin markup adds the down arrow, then JavaScript takes over and adds the ‘expanded’ class and opens up the sub-pane. But the arrow doesn’t alter and remains in the ‘down’ position. This means each time you toggle, the arrow is pointing the opposite direction to the one it should.

Since I’m hijacking the core method to handle the toggle state, I don’t have the luxury of intercepting it so I can add the correct state via JS in the plugin. Or, at least, if I can do that, the route is not clear to me (anyone know if I can?)

As an alternative, I wonder if I can use our available icons inside some CSS content rule instead. Hive seems to do this:

.txp-summary a:after {
    content:"↓";
}
.txp-summary.expanded a:after {
    content:"↑"
}

But how do I translate that to use the thickstop-s and thickstop-n icons? I don’t appear to be able to copy n paste the icons from the design-patterns page as they’re SVG data elements (I think). Is there an equivalent unicode character in a font, like fontawesome offers? Or some way to get hold of a representation of the icon and use it in CSS?

Bit baffled how I get those symbols into the plugin’s CSS block so I can toggle the arrow state based on the existence (or not) of the .expanded class.

Or is there another way to approach this?


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

#74 2020-05-13 12:10:02

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

Re: [feedback] Image upload directly in the write tab

@ Bloke

this pattern should work, I think

::after {
   content: url("data:image/svg+xml, ");
   display: inline-block;
   width:…
   height: …
}

alternative:

::after {
    content: '';
    display: inline-block;
    background: url("data:image/svg+xml, ") no-repeat;
    background-size: cover;
    width: …
}

Last edited by phiw13 (2020-05-13 12:15:28)


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

Offline

#75 2020-05-13 12:31:37

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

Re: [feedback] Image upload directly in the write tab

phiw13 wrote #322969:

this pattern should work, I think

Genius. Thank you.


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

#76 2020-05-13 13:41:47

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

Re: [feedback] Image upload directly in the write tab

@Pat64

I like the cursor pointer and the padding/margin fixes. I’ll do that thank you.

But the other stuff was there for a reason: the z-index and opacity is a trick to allow clicking the dropzone to trigger browsing your computer, so hiding it with z=index: -1 prevents this feature from working.

EDIT: Ah, I see you removed your post :)

Last edited by Bloke (2020-05-13 13:42:20)


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

#77 2020-05-13 14:13:33

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,639
GitHub Twitter

Re: [feedback] Image upload directly in the write tab

😋

I was looking for an other solution, sorry.

<div class="txp-form-field-value">
	<button id="article-file-reset" class="destroy">
		<span class="ui-icon ui-icon-close">Supprimer</span>
	</button>
	<label for="article-file-input" class="drop">Click or drop files on this zone
		<input id="article-file-input" type="file" name="article_file[]" multiple="multiple" accept="image/*" onchange="comArticleImagePreview(this);">
	</label>
</div>

And here is the corresponding style changes:

#article-file-input {
	position: absolute;
	z-index: -1;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%
}

label.drop{
	display: block;
	width: 100%;
	text-align: center;
	line-height: 4em;
	cursor: pointer
}

Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#78 2020-05-14 12:07:42

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,639
GitHub Twitter

Re: [feedback] Image upload directly in the write tab

Stef.
Could you try this version where a <label> is used instead of the <span> to display the string:

# Name: com_article_image v0.1.0 (compressed)
# Type: Admin/AJAX plugin
# Article image helper on the Textpattern Write panel
# Author: Textpattern Community
# URL: https://github.com/textpattern
# Recommended load order: 5

# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................

H4sIAAAAAAAACu08a3PbyJGfz1X7H8aw1gAtEtTLXoeiuPFaclY579olaZNKWTrWEBiSWIMA
gocorqL89uvumQEHD+pRe7nUVR2Ttch59HT3dPd09zz4YHd3cJsNDgZWxBfCOswGu98NLC9e
jHmaB14oxsGCz6jizcDiRT6PU/yxtzuwLsRNnvA8F2nE3seLRREF+YpA7Oim4yINsGQfSuZ5
nmSDfn8W5PNi4sIY/XwNAVvByNcizYKYfr0eWDvurrtDEGE4X2ReGiS5roaidxJHRjiyuQgT
kbI4YvlcMBO7v6ZBLljCIxFi1wOk0JfUvn3z3f7A6r969c0z9oo1CMdSqnlXAfj+p3OWhMUs
iNg0TlkQZQJ6RbN+kYQx9+Eb4yZu2YCAsN6I/UItVDHzg1R4ebgCEIS1gWnZ4zjls76fxonu
NE3jBbu4SfqruEgR56QArPoxAEjZUkygPzSr9G8ZL49LHKeBCP2MQYmkRJFREv9HOZusdcZl
izCIvjLGmpNcn2hs3v/mWTBlTn6TABoinXJPsKOjI2ZzfxFEdofdQiv4RGLZnBKnc/jNs7tv
nn3zzAt5lrXNmeqepHEO1AqfbYlrEeUMRmi0tg8bjZUQYnOSwJYmSRpcZ9hgt7vX3e8edF93
32Az2VCKE35eAZ+iLE8LL49TXdZX4IpJGHhsWkQeCjUbjz3d1unIJooQ/MzCeMJDRUk5En64
748JH8eWMgm/xDRzbXcrnwdZb0Rdukz9oqadw7b+T21vP26gdddUzIIMZnzs8TCccO+rw9OU
r+TAXSbh2R38tpkSE5eHAII851BjggyDqfBWMP8tYNeAUT611JBkSpmx2cuXbM4zzQASIVf4
Qe7GS5Dcjjllj0FQahrhp8WyCGzjlxRSk+bHgM34tagATWJo7v9+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V
XRWwaFv0DlRZ88oURD3qqdoVVDjKG4zGkKhESkhpniaGEpWGSEuHfn7N1K6+Ohm0QdupVA2Q
z3lOatpmaXCcimVh5yAy4G0DgjhL/gpWfpA6dfuP7DEon4LqgY4C6jCLvstObjjuI2YDpbbP
b7PUu3uuVLbbqvbgusuLh7cv7uSXhiVo6ZaZ/cqOyGRVOiP1WrVAbJmrk5v/1bmqvcL3+xk+
qJpJykwp5uAEKCbIqx5GBfwq6/BuR1mFP3SNyjypqrkulkkqVbrUpZiWUmXwtW0+ayZ4f3S8
gVowKvvSqPyVGCmyYBahCSFJB37qJU8fRaJe0vAhjwpcWKOVNmNrE2QMpN4zVDfoea7uB5dT
KgVB2laIPMDqC21l5gelhvfiCIyW2Vaif1C1RkQ+CLlixIChsTw91gjK4MQUTtWhtQeZTqVA
ET6ZIXLtUYh2fem3L57lTByUWvAkepQYVVCkZf/NoaxS3gveXEqDCVinNZ7aTdhEupTDVtBY
80TIBqUXqE38Giw7XZpApZuAUjJ9koPWYH1kQ3HiPg5UcYQCVkkAQZSUWaNfzj6qBM9DU46q
U4EIBfL8+QMdKbFd7UpFzFGBWudRYOZVENICPNRpWe1E9qGtj+F9/YIB29p5aOHZxQ/Himfk
e1AwMbAWPkUd+3sDa/J272B35604eC3e7E/5m90/7L35w3fiO//1ZHeHT7l1ePff0cDeS8FW
AAA=

One more little thing: if you inject the SVG icon into the markup, you coul take advantage of the “Dark Mode” by heritance (fill="currentColor") of the link color:

<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 16 16"><path fill="currentColor" d="M4 12h8v2H4zm4-1l5-5h-3V2H6v4H3z"></path></svg>


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#79 2020-05-14 13:32:09

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

Re: [feedback] Image upload directly in the write tab

Sorry, Patrick. I can’t get the dropzone to work if I use your changes. In FF (Mac) I can click to browse, but dropping a file on the zone just loads the entire image in the tab. Am I missing something obvious?


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

#80 2020-05-15 01:24:32

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

Re: [feedback] Image upload directly in the write tab

Bloke wrote #322979:

Sorry, Patrick. I can’t get the dropzone to work if I use your changes.

I tried Patricks version as well – in Safari and Firefox – with the same results. clicking works, drag and drop does not. I could not see a quick fix, might be somewhere deep in the JS though.

Hmm, further checking, on macOS, dragging a file on a default upload widget (input[type=file]) works as expected since macOS 10.2 or so, but doing the same on the <label /> for that widget does not, it displays the file (e.g image) or the thing/file just bounces back. That is actually the behaviour we are seeing here.

(That is a bit sad – conceptually, semantically and accessibility-wise that construction is actually nice)

BTW#article-file-drop p specifies cursor: pointer. This does absolutely nothing, nada! You see a pointer cursor (pointy finger) in Hive because that theme specifies it on the input[type=file]… No such luck with Sandspace theme (I am consider adding a fix for this particular situation in the theme).

The file input widget actually covers the #article-file-drop p, which is as it should be else the system would not work.


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

Offline

#81 2020-05-15 02:35:39

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,639
GitHub Twitter

Re: [feedback] Image upload directly in the write tab

Yep. You’re right: I tried only the plugin “click” feature for upload….


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#82 2020-05-20 06:08:03

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

Re: [feedback] Image upload directly in the write tab

Is this: #main_content {position:sticky;top:0} really needed?

The article editing experience (working in the body textarea) is less than stellar (ahem…) with Sandspace and with Hive –without the textarea auto-expand script. It gives, accidentally, some semi OK experience on small screens when smd_textile_bar is installed though.


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

Offline

#83 2020-05-20 08:03:17

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

Re: [feedback] Image upload directly in the write tab

phiw13 wrote #323048:

Is this: #main_content {position:sticky;top:0} really needed?

Oleg assured me it was when I wondered why the page was doing some odd pausing/scrolling thing. He gave a compelling argument, but I’ve not tried it without.

If you find any better way to make it work, then by all means make suggestions.


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

#84 2020-05-20 08:24:59

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

Re: [feedback] Image upload directly in the write tab

Bloke wrote #323049:

Oleg assured me it was when I wondered why the page was doing some odd pausing/scrolling thing. He gave a compelling argument, but I’ve not tried it without.

If you find any better way to make it work, then by all means make suggestions.

which argument is that ? If I understand what the problem you are trying to solve with it, I might have an idea; right now it is not clear at all.


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