Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module presentation #4266

Closed
wants to merge 16 commits into from
Closed

Conversation

mdouchin
Copy link
Collaborator

@mdouchin mdouchin commented Mar 4, 2024

TODO

image

Funded by QAIR International https://www.qair.energy/

@mdouchin mdouchin marked this pull request as draft March 4, 2024 17:56
@github-actions github-actions bot added this to the 3.8.0 milestone Mar 4, 2024
@Gustry Gustry added the sponsored development This development has been funded label Mar 4, 2024
Copy link
Collaborator

@laurentj laurentj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use modern usage of PHP and of Jelix 1.8 ;-)

@@ -0,0 +1,21 @@
<?php

class lizmapModuleUpgrader_userfields extends jInstallerModule
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use the new classes of Jelix 1.8 \Jelix\Installer\Module\Installer (install.php should use it too, but it can be done into an other patch)

class lizmapModuleUpgrader_userfields extends jInstallerModule
{
public $targetVersions = array(
'3.8pre',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must indicate here only versions of other branches if it is backported in previous branches, and the next version of the current branch . so here only ['3.8.0-alpha.1'] or ['3.8.0-pre.20240308'], so you must put at the same time this version into module.xml.

{
public function ongetMapAdditions($event)
{
$basePath = jApp::config()->urlengine['basePath'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a method for that on jApp.

$css = array();

// Check config
jClasses::inc('presentation~presentationConfig');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

store you presentationConfig class into a lib directory, with a namespace, and declare the namespace into the module.xml sot the class will be autoloadable, and you won't need to do jClasses::inc(). jClasses is deprecated.

),
);

$jsCode = array(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please stop embedding JS or CSS directly into the HTML, it is not anymore a good practice, and it avoid us to have good secured CSP. For dynamic JS, create an action that will forge the JS, and declare the address of the action here.

*
* @license Mozilla Public License
*/
class serviceCtrl extends jController
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a bunch of serviceCtrl class into the project (!!). You should use an other name.

*
* @license Mozilla Public License
*/
class presentationModuleInstaller extends jInstallerModule
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use the new classes of Jelix 1.8 \Jelix\Installer\Module\Installer

*
* @license Mozilla Public License : http://www.mozilla.org/MPL/
*/
class presentationModuleUpgrader extends jInstallerModule
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use the new classes of Jelix 1.8 \Jelix\Installer\Module\Installer

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<suburls xmlns="http://jelix.org/ns/suburls/1.0">

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should declare url of each action here, and create a install/configurator.php to declare the url (see example into some external modules, like wps)

@gioman
Copy link
Contributor

gioman commented Mar 8, 2024

This is a nice feature, is there any demo/screenshot about how a presentation could look like? Would/could slides be linked to a certain state/scale/extent of the map?

@mdouchin
Copy link
Collaborator Author

mdouchin commented Mar 8, 2024

@laurentj This PR is at a very, very early stage. It was not supposed to be reviewed before end of april 🤣 . This is why I did not add reviewers and why it is marked as draft. Anyway, OK for all comments on the usage of the new Jelix ways, I will update the code.

@gioman I can provide a full description if needed. This is a funded work, which should land of 3.8.

is there any demo/screenshot about how a presentation could look like?

Not yet

Would/could slides be linked to a certain state/scale/extent of the map?

Yep !

@mdouchin mdouchin self-assigned this Mar 8, 2024
@gioman
Copy link
Contributor

gioman commented Mar 8, 2024

Would/could slides be linked to a certain state/scale/extent of the map?

Yep !

nice !

@Gustry Gustry modified the milestones: 3.8.0, 3.9 May 13, 2024
@github-actions github-actions bot modified the milestones: 3.9, 3.8.0 May 15, 2024
@Gustry Gustry modified the milestones: 3.8.0, Next 3.9 May 27, 2024
@mdouchin mdouchin force-pushed the module-presentation branch from 35c92e1 to a353d06 Compare May 27, 2024 10:03
@github-actions github-actions bot modified the milestones: Next 3.9, 3.8.0 May 27, 2024
@mdouchin mdouchin force-pushed the module-presentation branch from 1fda78e to 494bbae Compare June 4, 2024 09:51
@Gustry Gustry modified the milestones: 3.8.0, 3.9.0 Jun 7, 2024
@mdouchin
Copy link
Collaborator Author

We worked instead on a separate module to be able to release it for 3.7 and 3.8. and spend more time testing and polishing it.
We would probably integrate it in a future LWC version, but not yet.

@mdouchin mdouchin closed this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature sponsored development This development has been funded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants