V2.3 coordination #1095
Replies: 9 comments 28 replies
-
Hi all: My latest contribution includes the following:
See https://github.com/diderich/leantime/blob/dts/CHANGELOG-2.3.0.md for further details |
Beta Was this translation helpful? Give feedback.
-
@phulstaert . Looked at your draft work. Very interesting. Some comments/ideas/questions from my side (with the goal for improvement, not criticism) which you may or may not agree with.
[general]
sitename = "Leantime"
language = "en-US"
...
[database]
host = "localhost"
user = "leantime"
...
[smtp]
...
Keep up the good work. |
Beta Was this translation helpful? Give feedback.
-
Currently, when adding a new canvas/kanban, it needs to be "sort of registered" in the Do you have any ideas or suggestions how to handle this situation (and potentially similar ones) in a clean way? |
Beta Was this translation helpful? Give feedback.
-
With the new themes concept, it should be possible to define the logo to use and the look and fee at the theme level, rather than, or in addition to the company level. This should be moved to new features once the release 2.3 has been active and the feature has not yet been implemented. A skeleton for the logo is available as |
Beta Was this translation helpful? Give feedback.
-
@diderich @phulstaert @marcelfolaron I have to look a lot more into each of your PRs, but I'll open something for discussion that I'm running into on my end. in //actionname.filename
//actionName is foldername
$actionName = self::getActionName($completeName);
//moduleName is filename
$moduleName = self::getModuleName($completeName);
//Folder doesn't exist.
if(is_dir('../src/domain/' . $moduleName) === false || is_file('../src/domain/' . $moduleName . '/controllers/class.' . $actionName . '.php') === false) {
self::dispatch("general.error404");
return;
}
$pluginPath = ROOT.'/../src/plugins/' . $moduleName . '/controllers/class.' . $actionName.'.php';
$domainPath = ROOT.'/../src/domain/' . $moduleName . '/controllers/class.' . $actionName.'.php';
$controllerNs = "domain";
//Try plugin folder first for overrides
if(file_exists($pluginPath)) {
$controllerNs = "plugins";
require_once $pluginPath;
}else if(file_exists($domainPath)) {
require_once $domainPath;
}else{
self::dispatch("general.error404", 404);
return;
} template: //frontcontroller splits the name (actionname.modulename)
$action = $this->frontcontroller::getActionName($template);
$module = $this->frontcontroller::getModuleName($template);
$pluginPath = ROOT.'/../src/plugins/' . $module . '/templates/' . $action.'.tpl.php';
$domainPath = ROOT.'/../src/domain/' . $module . '/templates/' . $action.'.tpl.php';
//Try plugin folder first for overrides
if(file_exists($pluginPath)) {
require_once $pluginPath;
}else if(file_exists($domainPath)) {
require_once $domainPath;
}else{
throw new \Exception($this->__("notifications.no_template"));
} Personally, I don't like how this forces plugin developers to adhere to specific folder/file structures. Personally, I prefer WordPress's methodology with plugins, which is basically "modify your instance however you like". It gives freedom to developers to make more amazing things, which I think is the main reason for its success in building the community that surrounds it. It also doesn't allow plugin authors to create their own modules, but only overwrite existing ones. But before I rework this to allow plugin developers to "register" their own modules and template paths, I'd like to discuss this concept with you all and see your thoughts. How I would refactor frontcontroller for example: //actionname.filename
//actionName is foldername
$actionName = self::getActionName($completeName);
//moduleName is filename
$moduleName = self::getModuleName($completeName);
$actionPath = events::dispatch_filter(
"requests.$actionName.$moduleName",
ROOT . "/../src/domain/$moduleName/controllers/class.$actionName.php",
[
'action' => $actionName,
'module' => $moduleName
]
);
//Folder doesn't exist.
if(!file_exists($actionPath)) {
self::dispatch("general.error404");
return;
}
require_once $actionPath;
//Initialize Action
try {
$classname = events::dispatch_filter(
"action_classname",
"leantime\\domain\\controllers\\".$actionName,
[
'module' => $moduleName,
'action' => $actionName
]
);
$action = new $classname();
// .... That way, if a plugin developer wanted a url that looked like "/newmodule/show" then they could simply register: events::add_filter_listener('core.frontcontroller.executeAction.requests.newmodule.show', function ($filepath, $params) {
if (empty($params['module'])
|| empty($params['action'])
) {
return $filepath;
}
$newfilepath = ROOT . "/../src/plugins/my/own/${params['module']}/and/${params['action']}.php";
if (!file_exists($newfilepath)) {
return $filepath;
}
return $newfilepath;
});
events::add_filter_listener('core.frontcontroller.executeAction.action_classname', function ($classname, $params) {
return "myPluginNs\\{$params['module']}\\whatever\\{$params['action']}";
}); |
Beta Was this translation helpful? Give feedback.
-
Here is an example of how a custom canvas could be added to the system by deploying it in the ' /custom/` directory. |
Beta Was this translation helpful? Give feedback.
-
HI all. I would like to summarize (my understanding of) the discussion I had beforehand with @marcelfolaron as well as in this thread regarding the directory structure to ensure we have a common understanding. Basic Principles
Resulting directory structure
Incorporating licensing
Incorporating customization
@marcelfolaron , is that a correct representation of the discussion we had? If not, please ammend :-) |
Beta Was this translation helpful? Give feedback.
-
Now looking at release timelines. @phulstaert Were you able to adjust the folder structure as discussed? |
Beta Was this translation helpful? Give feedback.
-
That's exciting!
…On Wed, Nov 9, 2022 at 11:40 PM broskees ***@***.***> wrote:
@marcelfolaron <https://github.com/marcelfolaron> update: Majority of the
code is done. Just testing remains.
I have a plan for a more extensive filtering/event system specific to
templates that can be implemented as we include twig/blade.
—
Reply to this email directly, view it on GitHub
<#1095 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALG4EFQQZVWFIZYJ2KJ62IDWHR4ENANCNFSM6AAAAAARSL7VU4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @diderich @phulstaert @broskees:
You all have 3 very large features and PRs that I am incredibly excited to merge. Let's use this thread to coordinate these efforts.
A summary of the changes I know so far:
@phulstaert worked on reworking the application start, configuration files and installation routines. This streamlines a lot of the class flow and will make things a lot easier. https://github.com/phulstaert/leantime/tree/New-bootprocess
@broskees expanded significantly on my initial plugin and event management system.
#1079
@diderich reworked our canvas modules and included a lot more canvas strategies. He also worked on the folder structure to allow developers to include customizations as well as themes and plugins.
https://github.com/diderich/leantime/tree/dts
I will add changes to the folder structure based on @diderich work.
I still have an API proof of concept open that I'd like to include in 2.3.
All of these features are somewhat connected and will need to be merged in the right order.
Here is my suggestion in terms of merge order:
@diderich probably made the most significant changes in terms of folder structure. It would be easiest if we start there.
Next we should merge @phulstaert PR to build on top of the new structure.
Lastly @broskees. This should have the least issues.
I can squeeze in my changes at the end. I created a new branch called Leantime-V2.3. Lets push our 2.3 changes into that one first while we resolve conflicts.
@gloriafolaron FYI
Beta Was this translation helpful? Give feedback.
All reactions