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

Configurable publishing #236

Open
stephenwf opened this issue Mar 30, 2023 · 0 comments
Open

Configurable publishing #236

stephenwf opened this issue Mar 30, 2023 · 0 comments

Comments

@stephenwf
Copy link
Member

Aspects of publishing

  • One or more steps that need to be completed in order
  • Progressively changing the resource as it goes through the process
  • Some steps may require authentication
  • Manifest Editor should provide a flexible API - not huge implementations

One idea for this is to use iframes and postMessage. This would allow both internal and external UI and scripts to run
as part of a pipeline. This documents a scenario for composing these steps together (but could easily just be a single URL).

Configuring a publishing process

const config = {
  publishing: [
    {
      label: 'Publish to Github'
      type: 'pipeline',
      steps: [
        {
          label: 'Login with Github',
          url: 'https://mygithubloginproxy.com/',
          type: 'frame-login',
        },
        { 
          label: 'Select repository',
          url: 'https://mygithubloginproxy.com/select-repo',
          type: 'frame',
        },
        { 
          label: 'ID Generation options',
          url: 'https://mygithubloginproxy.com/id-generation',
          type: 'frame',
        },
        {
          label: 'Save',
          type: 'frame',
          url: 'https://mygithubloginproxy.com/save',
        },
        {
          label: 'Slack notification',
          type: 'frame',
          url: 'https://mygithubloginproxy.com/slack',
        }
      ]
    }
  ]
}

This mock example shows what a configuration may look like for publishing:

  • Login
  • Select repository
  • ID Generation options
  • Saving to Github
  • Sending notification

When each step runs, a set of postMessage() will be sent to each frame (to be defined) sending the IIIF + a context
object that is shared by the steps. For example, the Login step may ensure a cookie is present OR present the user with a login
screen. Once the login has happened it would perhaps add the Github username to the context.

  • {manifest: ...}
  • Login
  • {gh_user: 'stephenwf', manifest: ...}
  • Select repository
  • {gh_user: 'stephenwf', repo: 'my-iiif', manifest: ...}
  • ID Generation options
  • {gh_user: 'stephenwf', repo: 'my-iiif', manifest: ...} (different manifest)
  • Save to Github
  • {gh_user: 'stephenwf', repo: 'my-iiif', gh_url: '...', manifest: ...}
  • Sending notification

As you can see, steps can use the "context" from previous steps (and may require it!).

With this mechanism we can have "keywords" in the context that might be used by the Manifest Editor. For example, a me_published_url
field could for example be used in the ME to link back to the published manifest.

Each step is an iframe, and it can optionally show a UI to the user when they are going through the publishing UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant