Closed deitch closed 9 years ago
I like the idea. But:
If you could change this, I merge it with #27 to version 0.6.0.
(1)
(2)
@Andr3as OK, so feedback:
OK, it is updated as follows:
Done.
About the design: the two images are just examples, I just want an unobtrusive one. Your current solution is okay.
But there some points before I can merge it:
init.js
and insert an empty line after each function (f.e. here)isEnabled
to make it's purpose clear; f.e. something like isEnabledRepoStatus
codiad.plugin.codegit.disable
)
- Please fix the whitespace
Done
- Please follow the code style in init.js and insert an empty line after each function (f.e. here)
Done
- Please rename isEnabled to make it's purpose clear; f.e. something like isEnabledRepoStatus
Done
- Change the settings identifier too (
codiad.plugin.codegit.disable
)
Changed to codiad.plugin.codegit.disableRepoStatus
- Please change the poller interval, every 10 seconds are still enough.
Done
Please integrate the updates from this gist to allow users to change the settings (using the integrated settings engine of codiad)
Working on it. I need to try to figure out what the gist does. No doc, is there?
Please integrate the updates from this gist to allow users to change the settings (using the integrated settings engine of coded)
You lost me on this. What exactly is this? Obviously some sort of declarative description of adding a settings option using plugin.json
, which appears to launch generalSettings.php
, and an event listener on the client (js
) side for changed settings? But how does this all tie together?
Some time ago we created a way for plugins to extend the settings of codiad. You find more details about this here.
In short: It defines for codiad where to find the plugins settings for the subscreen. Codiad takes care on saving them.
I hope this helps you to understand the code. If not I can write more about it.
OK, I followed your lead on the settings management. Not sure I got it right, but....
Did I see that you moved 0.6.0
into the master
branch? Is it ready for me to fix the PR so it can merge in?
Yes, everything is ready.
Got it! Merged 0.6.0 in, resolved conflicts (minimal), updated and out. As soon as you have this committed, I will merge the other one.
Ok, but there are still some points:
data-setting
attribute here to the current setting identifier codiad.plugin.codegit.disableRepoStatus
Are you sure with the last commit name?
Thanks
- Please fix the indentation (4 Spaces): OK done and pushed.
- Change the data-setting attribute here to the current setting identifier OK done and pushed.
- Please put here some code to react on changed settings Yeah, I was still figuring out how to use the setting change. I still am confused by how this works.
When I use the generalSettings
plugin to save the settings, where exactly does Codiad save them? And how can I retrieve them client-side? The previous examples used localStorage.getItem()
, but that doesn't seem to work here.
Codiad saves your settings in data/settings.php
of your Codiad installation and in the localStorage of your browser. To retrieve them use localStorage.getItem(IDENTIFIER)
.
The previous example didn't worked because the identifier in generalSettings.php
was different to the one in init.js
.
data-setting
attribute defines under which identifier (key) to save the setting. You saved it to codiad.plugin.codegit.disable
. To retrieve it you looked under codiad.plugin.codegit.disableRepoStatus
. You see the problem?Yes, got it now. Updated and pushed. Please look.
Thank you for contributing
This creates a colour-coded and text-filled line at the top of the project file explorer if the root is a git repo.
The statuses are:
The status line is clickable, bringing up the CodeGit window.