Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feature request: better component editor
#1
I am currently converting a php-based site to GetSimple. The php is used to handle database requests and downloads. There are several fairly large php modules.
I have incorporated these modules as components and it is already partially working, even though I have a lot of work left to do.
I have found the component editor to be particularly inconvenient. It is apparently a different editor than the one used for web pages. It may be OK for components that are a few lines long, but very unwieldy when they are several hundred lines long.
Some of the most missing features (as of now):
1) no support for entering tabs, to indent the code, even though tabs in the code that I imported are displayed (I use Chrome and Firefox under Windows, and ChromeOS on a Chromebook)
2) no line numbers
3) no selectable font (maybe it is selectable and I have not found where the setting is). I would like to use a fixed spacing font if possible.
It would be really great if these features were available, or if there was a convenient way to edit components outside this editor.
Thanks in advance for any advice regarding enabling these features.
Reply
#2
Already in 3.4
Master branch

use the theme highlighter plugin for now
http://get-simple.info/extend/plugin/the...ghter/186/
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(2015-01-04, 02:03:46)shawn_a Wrote: Already in 3.4
Master branch

use the theme highlighter plugin for now
http://get-simple.info/extend/plugin/the...ghter/186/

Wow, that was fast and it looks so much better!
Thank you a lot!
Looking forward to 3.4...
Reply
#4
coding is much better in 3.4
adjustable max-width ( no more 800px )
resizable editors, fullscreen mode, themable codemirror, ajax saving
auto grow, auto height editors so they stay out of the way

[Image: gs_components.png]
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2015-01-04, 00:46:41)Didier9 Wrote: ... but very unwieldy when they are several hundred lines long.

Yes, components have taken on a role much bigger than the original vision, I guess.

You may also want to have a look at the It's All Text! (Firefox) add-on, which allows you to edit text in your preferred editor.
--
Nick.
Reply
#6
awesome hameau
Thanks
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
(2015-01-04, 02:28:29)shawn_a Wrote: coding is much better in 3.4
adjustable max-width ( no more 800px )
resizable editors, fullscreen mode, themable codemirror, ajax saving
auto grow, auto height editors so they stay out of the way

[Image: gs_components.png]

Shawn,
When is 3.4 anticipated to be available for download?
Reply
#8
Its in development, not even alpha, but stable enough to use if you want to at your own risk.

master branch on github.

It is very close, but still months away from an alpha probably.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
Great, that looks like the Monokai Theme Smile
Another nice (easy to implement?) pseudo-feature would be to allow the right sidebar to get a fixed position once you scroll below the fold... Would make the navigation less cumbersome.
Reply
#10
also already standard in 3.4
and available in 3.3.x also using gsconfig GSSTYLE FIXED
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#11
(2015-02-13, 11:36:19)shawn_a Wrote: also already standard in 3.4
and available in 3.3.x also using gsconfig GSSTYLE FIXED

Ah thanks! Didn't have a thorough look at the 3.3.3+ versions yet.
Another question: do you guys have plans to split components into separate files? That would be easier and more 'component-like' than the current, single components.xml file, and would make possible to have 'plugins' (well, components, perhaps a new subnav for the Extend section) consisting of blocks of PHP..

These could be modeled on other plugins as well, for example, I use this for I18n search results display. (includes code for custom fields, and custom site settings)

Code:
<item>
    <title><![CDATA[BlogSearchItem]]></title>
    <slug>blogsearchitem</slug>
    <value><![CDATA[
      <div class="post">
      <h3>
        <a class="permalink" href="<?php echo $item->url; ?>">
         <?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>
        </a>
        <img src="http://placehold.it/<?php get_setting('social/profile_photo_size'); ?>">
      </h3>
      <div class="post-meta">
        <time datetime=""><?php echo strftime($dateFormat, $item->pubDate); ?></time>
        <?php if ($item->author !== '') { ?>
        By <span class="post-author"><a href="">
        <?php echo $item->author;  ?></a></span>
        <?php } if ($item->category !== '') { ?>
        In <span class="post-category"><a href=""><?php echo htmlspecialchars($item->category); ?></a></span>
        <?php } ?>
      </div>
      <p class="post-excerpt">
        <?php if ($item->image !== '') { ?>
        <img class="post-thumb" src="<?php echo $item->image; ?>" alt="" title="">
        <?php } echo $item->getExcerpt($item->content, $numWords); ?>
      </p>
      <?php if ($item->showtags === 'on') { ?>
      <ul class="tags">
        <?php $tagsarray = $item->tags;
          for ($x = 0; $x < count($tagsarray); $x++) {
              echo '<li>' . htmlspecialchars($tagsarray[$x]) . '</li>';
          }
        ?>
      </ul>
      <?php } ?>
    </div>
    ]]></value>
  </item>
Reply
#12
yes but I do not think it will makes its way into 3.4, however I will make it possible to register components from a theme somehow, still don't know how exactly. Its on github
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#13
I love the improved component editor. Can't wait for that.

And being able to register components from a theme would be awesome as well, since many of my components are theme-specific.
Reply
#14
(2015-02-13, 11:36:19)shawn_a Wrote: [Fixed sidebar is] available in 3.3.x also using gsconfig GSSTYLE FIXED

Woo hoo! Never saw this – excellent!
--
Nick.
Reply




Users browsing this thread: 2 Guest(s)