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

[runSofa] improve the html DocBrowser #540

Merged
merged 11 commits into from
Jan 14, 2018

Conversation

damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Dec 12, 2017

Small improvement on the view of html file associated with scenes. We can now navigate (with backward) between and starting Sofa scene directly with hyperlinks. The windows can also be hidden/displayed and its location preserved.

I cannot prevent myself to also clean small things in RealGUI and SetDirectory/FileSystem.
But this is very minor.

I made a quick & dirty video to show the results so that you don't need to compile it:
https://youtu.be/5uumC9f-wzo


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

There was one in SetDirectory but I see ne reason to have that here.
So for consistency I move it in FileSystem.

Backward compatibility is preserved.
Refactor the way the html documentation associated with Sofa scene
are handled. The doc browser now have an history and link to sofa
scene are correctly handled to load the sofa scene. This is very
practical to make self documenting libraries.

The DocBrowser can be displayed from the Help menu.
@damienmarchal damienmarchal changed the title [runSofa] add a small doc browser [runSofa] improve the html DocBrowser Dec 12, 2017
@damienmarchal damienmarchal added this to the v17.12 milestone Dec 12, 2017
@damienmarchal damienmarchal added the enhancement About a possible enhancement label Dec 12, 2017
@damienmarchal damienmarchal added the pr: status to review To notify reviewers to review this pull-request label Dec 12, 2017
@guparan
Copy link
Contributor

guparan commented Dec 19, 2017

It would be nice to have this in v17.12
If [ci-build] is OK, let's merge :-)

{
namespace qt
{
sofa::helper::system::FileRepository GuiDataRepository("RUNSOFA_DATA_PATH", "../share/sofa/runSofa/ressources/");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using current resources dirs (e.g. share/icons)?
BTW, only one S for resources ;-)

Copy link
Contributor Author

@damienmarchal damienmarchal Dec 20, 2017

Choose a reason for hiding this comment

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

Good question.

This is to make things modular as I see no reason why the icons specific to a given end user application (here runSofa) should be in the data directory of the base framework. Said differently, If the user don't care about runSofa (or runSofa2) why its data repository should be polluated by these resources ?

So each project/plugin specific resources should reside in its own directory not in share/

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the modular idea but SofaGuiQt is not runSofa so I think it would better be sofa::helper::system::FileRepository runSofaDataRepository("RUNSOFA_DATA_PATH", "../share/sofa/runSofa/ressources/"); created in applications/projects/runSofa or sofa::helper::system::FileRepository GuiDataRepository("GUI_DATA_PATH", "../share/sofa/gui/ressources/"); in applications/sofa/gui.
What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plugins examples...are in the example sub-directory of the plugin directory and not in share.
Icon sets of external UI 'project' (like runSofa2) are in their project directory.
Actually even before this PR the icons of runSofa were not in share but in the runSofa dir...so please don't change that and let's keep a single rule that is clear to understand: specific per 'project' (or 'plugins') files have to stay in their project (plugin) directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that's exactly what I was saying in my second post. So what about my proposal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I miss-understood you last comment.

I see no problem in making things more consistent by renaming things as long as the files stays separated from the sofa/share.
Can you do that..caus .I'm focused on something else.

@guparan
Copy link
Contributor

guparan commented Dec 21, 2017

[ci-build] (testing)

@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests]

@damienmarchal
Copy link
Contributor Author

[ci-build]

@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests] do you really work ?

@guparan
Copy link
Contributor

guparan commented Dec 22, 2017

Yep, I just fixed it ;)

@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests]

Because Sofa is such an HQ software that we cannot live with mispelling in
our pathnames ;)
@guparan
Copy link
Contributor

guparan commented Jan 11, 2018

[ci-build][with-scene-tests]

@sofa-framework sofa-framework deleted a comment from damienmarchal Jan 11, 2018
@damienmarchal
Copy link
Contributor Author

[ci-build][with-scene-tests]

@guparan
Copy link
Contributor

guparan commented Jan 12, 2018

@damienmarchal Did you notice the unit test failures? It's about PSL.

@damienmarchal
Copy link
Contributor Author

damienmarchal commented Jan 12, 2018

@guparan thank you for pointing that.The problem is that the CI machine *_pr3 does not have the python module 'hjson' installed consequently psl tests failed.

EDIT: So you can safely ignore them...& merge the PR.

@guparan
Copy link
Contributor

guparan commented Jan 12, 2018

Ok I'm gonna fix that, I'll also fix the missing timeout command on the mac_pr3 VM.

@guparan
Copy link
Contributor

guparan commented Jan 12, 2018

Done! [ci-build][with-scene-tests]

@damienmarchal
Copy link
Contributor Author

damienmarchal commented Jan 12, 2018

The fails again... the mac_clang-3.4 succeeded (I restarted but the previous build was here
https://ci.inria.fr/sofa-ci/job/mac_clang-3.4_options_pr3/25/console)
And the additional failure in test scenes is because some machines still don't have the libjpeg/tiff library installed (se macos pr3 ) :)

@guparan, @hugtalbot if you are passing by please considere merging the PR because we need it monday morning for our group writing of tutorials for Sofa :)

@guparan guparan merged commit 691c470 into sofa-framework:master Jan 14, 2018
@damienmarchal damienmarchal deleted the addDocBrowser branch February 12, 2018 12:53
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants