GetSimple Support Forum
Feature request: better component editor - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7)
+--- Thread: Feature request: better component editor (/showthread.php?tid=7009)



Feature request: better component editor - Didier9 - 2015-01-04

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.


RE: Feature request: better component editor - shawn_a - 2015-01-04

Already in 3.4
Master branch

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


RE: Feature request: better component editor - Didier9 - 2015-01-04

(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/theme-highlighter/186/

Wow, that was fast and it looks so much better!
Thank you a lot!
Looking forward to 3.4...


RE: Feature request: better component editor - shawn_a - 2015-01-04

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]


RE: Feature request: better component editor - hameau - 2015-01-04

(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.


RE: Feature request: better component editor - shawn_a - 2015-01-04

awesome hameau
Thanks


RE: Feature request: better component editor - Didier9 - 2015-01-07

(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?


RE: Feature request: better component editor - shawn_a - 2015-01-07

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.


RE: Feature request: better component editor - Tyblitz - 2015-02-13

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.


RE: Feature request: better component editor - shawn_a - 2015-02-13

also already standard in 3.4
and available in 3.3.x also using gsconfig GSSTYLE FIXED


RE: Feature request: better component editor - Tyblitz - 2015-02-14

(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>



RE: Feature request: better component editor - shawn_a - 2015-02-16

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


RE: Feature request: better component editor - indyana - 2015-02-21

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.


RE: Feature request: better component editor - hameau - 2015-02-23

(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!