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

refactor: use rich text component from analytics #2474

Merged
merged 42 commits into from
Jun 7, 2024

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Jun 28, 2023

Related to DHIS2-15522

Requires dhis2/analytics#1525


Key features

  1. Use RichTextEditor component from analytics

Description

This allows to remove most remaining d2-ui dependencies.

The editor is used in the TextInput dashboard item type.


TODO


Screenshots

Before:
Screenshot 2023-06-28 at 15 46 04

After:
Screenshot 2023-06-28 at 15 46 22

@edoardo edoardo force-pushed the refactor/use-analytics-rich-text branch from e885648 to f5f082c Compare June 28, 2023 14:05
@edoardo edoardo changed the title Refactor/use analytics rich text refactor: use analytics rich text Jun 29, 2023
@edoardo edoardo changed the title refactor: use analytics rich text refactor: use rich text components from analytics Jun 29, 2023
@edoardo edoardo marked this pull request as ready for review June 29, 2023 14:21
@edoardo edoardo changed the title refactor: use rich text components from analytics refactor: use rich text component from analytics Jun 29, 2023
dhis2-bot and others added 17 commits December 12, 2023 09:36
* chore: 26.2.0-cumulative-values-alpha.1

* chore: [email protected]
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…-tools-4.3.2

chore(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](browserify/browserify-sign@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](brix/crypto-js@4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Related to https://dhis2.atlassian.net/browse/LIBS-383

Add package patches to the yarn cache key.

If a new patch is added, then this ensures that that the yarn cache
gets invalidated and forces yarn install, which will then do the
postinstall step that applies the patches.

From user perspective, the e2e-prod tests might fail if it is depending
on a patch that didn't get installed.

Co-authored-by: Jan Henrik Øverland <[email protected]>
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 7.2.4 to 7.2.9.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](reduxjs/react-redux@v7.2.4...v7.2.9)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Bumps [moment](https://github.com/moment/moment) from 2.29.4 to 2.30.1.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.4...2.30.1)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Bumps [@dhis2/d2-i18n](https://github.com/dhis2/d2-i18n) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/dhis2/d2-i18n/releases)
- [Changelog](https://github.com/dhis2/d2-i18n/blob/master/CHANGELOG.md)
- [Commits](dhis2/d2-i18n@v1.1.1...v1.1.3)

---
updated-dependencies:
- dependency-name: "@dhis2/d2-i18n"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps
[@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse)
 from 7.18.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
* chore(deps): bump @dhis2/app-runtime from 3.9.4 to 3.10.2

Bumps
[@dhis2/app-runtime](https://github.com/dhis2/app-runtime/tree/HEAD/runtime)
from 3.9.4 to 3.10.2.
- [Release notes](https://github.com/dhis2/app-runtime/releases)
- [Changelog](https://github.com/dhis2/app-runtime/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dhis2/app-runtime/commits/v3.10.2/runtime)

---
updated-dependencies:
- dependency-name: "@dhis2/app-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump @dhis2/d2-i18n from 1.1.1 to 1.1.3 (#2896)

Bumps [@dhis2/d2-i18n](https://github.com/dhis2/d2-i18n) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/dhis2/d2-i18n/releases)
- [Changelog](https://github.com/dhis2/d2-i18n/blob/master/CHANGELOG.md)
- [Commits](dhis2/d2-i18n@v1.1.1...v1.1.3)

---
updated-dependencies:
- dependency-name: "@dhis2/d2-i18n"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @babel/traverse from 7.18.13 to 7.23.2 (#2796)

Bumps
[@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse)
 from 7.18.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
* chore: nightly failing to set up cypress (#2378)

The verify workflow should run on tags, so that a corresponding branch is created
in the d2-ci repository

Do not run the release step on PRs, but do allow it for pushes

yarn cypress install sometimes fails. Turns out it isn't necessary anyway
since the cypress-io gh action takes care of installing cypress.

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* docs: move docs to app (#2384)

* chore(release): cut 100.0.1 [skip release]

* **translations:** sync translations from transifex (dev) ([5b0b3b6](5b0b3b6))

* chore(deps): bump @dhis2/ui from 8.13.6 to 8.13.11

Bumps [@dhis2/ui](https://github.com/dhis2/ui/tree/HEAD/collections/ui) from 8.13.6 to 8.13.11.
- [Release notes](https://github.com/dhis2/ui/releases)
- [Changelog](https://github.com/dhis2/ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dhis2/ui/commits/v8.13.11/collections/ui)

---
updated-dependencies:
- dependency-name: "@dhis2/ui"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Co-authored-by: @dhis2-bot <[email protected]>
Co-authored-by: Jan Henrik Øverland <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@dhis2-bot dhis2-bot temporarily deployed to netlify April 4, 2024 11:25 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 25, 2024 10:47 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify May 2, 2024 10:17 Inactive
edoardo and others added 6 commits May 15, 2024 16:10
I don't quite understand this one, but it has to do with the percentage
height on the rich text div and the content-box height of the parent
container.
The fix has to be in the parent div since the rich text component can be
used in other places.
Sometimes the click events do not seem to trigger when in edit mode.
I found this in the grid's code which seemingly explains the issue:
https://github.com/react-grid-layout/react-grid-layout/blob/04a778264b056a024334d33d17305a57970ccc40/lib/ReactGridLayout.jsx#L681

Adding button to the list of draggableCancel elements seems to solve the
issue.
@dhis2-bot dhis2-bot temporarily deployed to netlify May 23, 2024 09:43 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify May 23, 2024 14:09 Inactive
@edoardo edoardo marked this pull request as draft May 24, 2024 13:37
@edoardo edoardo marked this pull request as ready for review May 24, 2024 13:37
@dhis2-bot dhis2-bot temporarily deployed to netlify June 5, 2024 08:47 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 7, 2024 12:53 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 7, 2024 13:11 Inactive
@edoardo edoardo merged commit 7d22275 into dev Jun 7, 2024
19 checks passed
@edoardo edoardo deleted the refactor/use-analytics-rich-text branch June 7, 2024 13:55
@edoardo edoardo mentioned this pull request Jun 14, 2024
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants