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

CRISTAL-381: Make the github backend supported #687

Merged
merged 5 commits into from
Feb 25, 2025
Merged

Conversation

pjeanjean
Copy link
Contributor

Jira URL

https://jira.xwiki.org/browse/CRISTAL-381

Changes

Description

  • Working authentication
  • Content display
  • Content edition
  • Content deletion
  • Updated navigation tree to use public API
  • Updated history to use public API

Clarifications

Login operations for the GitHub API have to be done in the backend. As such, a new backend has been implemented in ./github-authentication. It requires to set a Client ID for a GitHub app that has repo:read and repo:write permissions for the repository the user wants to use. This can be set in ./github-authentication/src/config.ts.

While working on this issue, I noticed that the transformImage was not working properly (i.e., mutation listeners were in fact not triggered on document change). I don't know since when this happens, but I added a simpler transformImagesInElements() function that should have, as an added benefit, less performance impact for this purpose.

Screenshots & Video

image
image

Executed Tests

Each new and changed feature was tested manually, and the current test suite was run manually.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A

* Working authentication
* Content display
* Content edition
* Content deletion
* Updated navigation tree to use public API
* Updated history to use public API
@manuelleduc
Copy link
Contributor

  • edit is displayed even when not logged in
  • missing header on history query
  • for now, we'll keep using the same json based storage, we'll switch for all backends at once (makes it easier to support internal links, new pages creation and attachments)
  • document all the setup in the wiki

@manuelleduc
Copy link
Contributor

  1. introduce authentication-github-ui
  2. load it from github.ts in lib
  3. move GitHubLoginMenu.vue in authentication-github-ui and define an extension UI component for it, with a sidebar.actions UIXP
  4. update GitHubLoginMenu.vue to have an empty activator (see AttachmentPreview.vue for inspiration)
  5. on GitHubAuthenticationManager.start change the vmodel of GitHubLoginMenu.vue to make the modal visible

* Use Cristal's json-based page definition
* Add Attachments support
* Add electron support
* Move GitHubLoginMenu to its own module
* Introduce GitHubAuthenticationState
* Add authenticationBaseURL to wiki conf
* Add missing translations
* Style improvements
* Add comments
* Small fixes
@manuelleduc manuelleduc merged commit 3b5aa88 into main Feb 25, 2025
3 of 5 checks passed
@manuelleduc manuelleduc deleted the CRISTAL-381 branch February 25, 2025 14:23
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

Successfully merging this pull request may close these issues.

2 participants