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 naming convention for global library #5495

Open
ebruchez opened this issue Oct 20, 2022 · 5 comments
Open

New naming convention for global library #5495

ebruchez opened this issue Oct 20, 2022 · 5 comments

Comments

@ebruchez
Copy link
Collaborator

ebruchez commented Oct 20, 2022

Right now, we use orbeon as app name for the global library. This is not always desired and we've had customers who found it confusing and wanted to change that name.

We could change that to global, with risks of awkwardness and backward compatibility (if users use that name already). A possible contender would be _, which is allowed and unlikely to be in use.

Steps:

  • implement support for _ in addition to global
  • implement Improve library forms UI #5494 and automatically generate _ by default instead of global behind the scene

See also #5494.

@ebruchez
Copy link
Collaborator Author

ebruchez commented Feb 14, 2024

+1 from customer for branding reasons

@ebruchez
Copy link
Collaborator Author

In fact, there is some confusion, as orbeon should be the library for orbeon forms. But that ship has sailed. We could support orbeon for backward compatibility. Details still sketchy.

@ebruchez
Copy link
Collaborator Author

ebruchez commented Sep 9, 2024

Clarify what the confusion is ;)

We ship with sample forms an orbeon library. This is stored in SQLite, but users will typically use their own production database, and therefore the sample orbeon library will not be available.

Shouldn't we have the ability to have a proper global library by default, which users could modify or clear if they wish to? Maybe the default global library could be "copy on write": by default stored in resources, and when saved, saved to the database? This would increase the chances that the library that ships doesn't just disappear when setting up a new database? Other ways would be:

  • copy/paste/publish source of the library
  • UI to import/reimport default library

Other considerations:

  • Existing users are likely to have an orbeon library, either because they copied the default one, or because they created their own.
    • So we need to be able to keep this working.
  • Demo forms might want to use parts from an orbeon library?
    • Although right now we just have our "US Address", and we should, instead, have a better version of this as sample in our global library. So maybe we don't need to ship a specific orbeon library.

Specific next steps to ship this change:

  • TODO

@ebruchez
Copy link
Collaborator Author

ebruchez commented Sep 19, 2024

The "copy-on-write" idea is interesting but how could we implement it? If we had persistence properties to separate read/write we could have:

  • oxf.fr.persistence.provider.orbeon.library.form.read = resources
  • oxf.fr.persistence.provider.orbeon.library.form.write = mysql ( this would just use the default provider)

But this wouldn't work once the library is read the first time, as it would keep being read from the resources provider.

So instead there should be some system of priority for providers, but that could become confusing and.

Alternatively, this could be an explicit operation:

  • we would store the library in resources
  • we would also store it into SQLite so examples work out of the box
  • but we would provide an explicit operation to setup the default library if it doesn't exist

In general, we should make library handling more explicit (#5494).

I am inclined to go the last route, and so let's assume that this is a problem separate from the switch to _.

@ebruchez
Copy link
Collaborator Author

ebruchez commented Sep 19, 2024

Possible steps:

  • ship with _ library (but we need decent content for that) in SQLite

  • don't ship with orbeon library anymore

    • users who have a working system and need the library will have it, or not, in their database
  • modify orbeon/controls form to use _?

    • yes, if we do have decent content in _ to show off
  • backward compatibility

    • published forms have their section templates included, so no change for those
    • Form Builder
      • fetch orbeon and _
      • P2: if app is not orbeon, and both are available, and form doesn't have orbeon sections, don't show orbeon?
        • it's not a big deal if we always show orbeon whe present
  • handle orbeon-library-version vs. global-library-version

  • handle frf:globalLibraryAppName() usages

  • doc

    • compatibility
    • how to create/import a library

The following is now covered by #6518:

  • add option to import the global library from resources on the Form Builder Summary and/or New page
    • if already published, this must be indicated to the user, or not presented to the user at all
      • so with SQLite, this wouldn't show
      • but with another provider, this typically would show at the beginning
    • if not done right away, copy/paste can be documented
      • copy from GitHub
      • paste to Form Builder
      • publish
  • ship _ library in resources

@ebruchez ebruchez self-assigned this Sep 19, 2024
@ebruchez ebruchez changed the title Consider new naming convention for global library/libraries New naming convention for global library/libraries Sep 19, 2024
@ebruchez ebruchez changed the title New naming convention for global library/libraries New naming convention for global library Sep 19, 2024
ebruchez pushed a commit that referenced this issue Sep 20, 2024
ebruchez pushed a commit that referenced this issue Sep 23, 2024
- also add 2 more section templates
- update Controls form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

1 participant