Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-03-19 12:59:02

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,205
Website

Re: Testers needed: flat development (4.7+ only)

Ok. Thank you Oleg.

So, I can use rvm_css within 4.7.


Patrick.
G+
Github | CodePen

Offline

#12 2018-03-19 19:45:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,912
Website

Re: Testers needed: flat development (4.7+ only)

Pat64 wrote #310136:

Ok. Thank you Oleg.

So, I can use rvm_css within 4.7.

Indeed you can. i’m using it on the beta site without any problems. Re the cache issue, this is what I have in the htaccess on dev sites I’m testing:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 5 seconds"
</IfModule>

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#13 2018-03-20 14:16:48

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,205
Website

Re: Testers needed: flat development (4.7+ only)

Thank you lot Colak!
You make my day and it’s always a pleasure to read you.


Patrick.
G+
Github | CodePen

Offline

#14 2018-04-01 11:28:12

Summer
Member
Registered: 2018-01-29
Posts: 48

Re: Testers needed: flat development (4.7+ only)

How is CSS in file editing?

Offline

#15 2018-04-02 08:37:55

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: Testers needed: flat development (4.7+ only)

Summer wrote #310530:

How is CSS in file editing?

If you prefer editing CSS/JS files directly, I can’t see any reason to serve them via txp. Just link to these files in page templates, anything wrong with it?


etc_[ query | search | pagination | date | tree | cache ]

Offline

#16 2018-04-12 10:05:58

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,093
Website

Re: Testers needed: flat development (4.7+ only)

Just wondering what the status is on this – are we likely to see something akin to this in core of 4.7.0.

And also web hooks to auto-inject flat files into database (as happens with rah_flat and oui_flat)?

Sorry to ask, but these are great additions to make themes much more useable in dev process.

Offline

#17 2018-04-12 10:49:21

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: Testers needed: flat development (4.7+ only)

philwareham wrote #310908:

Just wondering what the status is on this – are we likely to see something akin to this in core of 4.7.0.

I think it would be more prudent to postpone it to 4.7.1+. We need some time/feedback to avoid introducing future backwards incompatibility problems.

Right now, I would add few features:

  • a possibility to sync without passing by Themes tab (webhook, link, etc);
  • a more granular sync mechanism: sometimes you need to sync just, say, CSS files or some form.

But the themes code is rather complex (for me), I wouldn’t touch it just few days before 4.7 release.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#18 2018-04-12 12:05:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Testers needed: flat development (4.7+ only)

Not being a user of *_flat, how does the webhook mechanism work? Is it some unique (md5ish) URL that is assigned so if you touch it, the new content is brought into the DB? Is it one URL per theme? Is it destructive (a complete resync)?

Another option is to introduce buttons in each row of the Themes table (in an ‘Actions’ column or something) that will import/export that theme immediately, no prompts, no nothing. If you’re concerned that you might hit it by mistake, the column can be hidden via the list options. Is that any faster than the multi-edit dance? It’d be a cinch to add, and no compatibility issues since the ability to do so is already there.

The only sticking point is the ‘delete/sync’ thing. But maybe we can get away with reserving the sync capability to multi-edit only, and the simple import/export buttons per row only do a merge. Less destructive.

Desirable or not?


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

#19 2018-04-12 13:07:18

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,160
Website

Re: Testers needed: flat development (4.7+ only)

Bloke wrote #310912:

Not being a user of *_flat, how does the webhook mechanism work? Is it some unique (md5ish) URL that is assigned so if you touch it, the new content is brought into the DB? Is it one URL per theme? Is it destructive (a complete resync)?

In the ‘olden days’ ;-) we had just one set of pages, forms etc. rah_flat / oui_flat syncs them into the db on every page load (as far as I am aware) when you are in testing or debug mode. It syncs everything in the designated folder with the db removing everything that’s not there.
The only files it skips are those that don’t match the naming scheme, so you could exclude (or temporarily remove) files by, for example, prefixing them with an underscore. That can be useful when trying out variants.

Once you switched to live, it would not perform the sync unless you called the URL to manually trigger a sync. On installation, the plugin generates an md5ish URL but you could change that in a pref to an URL of your choosing. If you use a build script or deploy script, you could rsync your files to the server and then call the webhook to bring them into the DB without having to go into the admin area.


TXP Builders – finely-crafted code, design and txp

Offline

#20 2018-04-12 13:16:43

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,160
Website

Re: Testers needed: flat development (4.7+ only)

Bloke wrote #310912:

Another option is to introduce buttons in each row of the Themes table (in an ‘Actions’ column or something) that will import/export that theme immediately, no prompts, no nothing …

I’m not sure I understand you – or I understand the advantage of that. Do you mean setting something that sets “auto-sync” from now on?

The big advantage of rah_flat/oui_flat is that you don’t “need” the admin-side at all for a lot of dev work. The two key dev situations (from my point of view) are:

  • When developing a theme, you edit your template in your code editor, save it and refresh your browser to see what happens (or you have some build tool that automatically does that for you). Much the same as when you edit your css and reload. It’s just way faster and perfect for trial-and-error development ;-)
  • When transferring changes from a site developed locally or on a staged site to the live site, you sync your changes to the live server and get your deploy script to call the webhook when it’s done. Scripts like beam (which you put me on to) and others make that easy.

I thought the suggestion you made once before of having a hook you could define in the theme’s manifest file for your particular theme was a good idea. Maybe the question of whether “standard sync“ or “wipe and sync” takes place could also be set in the manifest file. Thinking aloud, it might actually be better to put the sync credentials in a separate file alongside the manifest.json to allow you to ignore that file from a git repo.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB