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

feat(UI): Add markdown editor to annotate item #1082

Merged
merged 15 commits into from
Jan 16, 2025
Merged

Conversation

rouk1
Copy link
Contributor

@rouk1 rouk1 commented Jan 10, 2025

Part of #1041

  • upgrade dependencies (eslint 9 \o/)
  • new icons
  • minimal skinnable rich text editor
  • expose python's set_note as a JSON API
  • plug the API in the frontend

UI preview

annotate.mp4

implementation choices

Finding a good and not too opinionated rich text editor is no easy job. After struggling with a few libs I decided that rolling a minimal editor may do the job (at least for now).

The RichTextEditor component (probably badly named) tries to:

  • help user with basic markdown syntax
  • keep interactions button outside of it for best skinnability

In a future work we may move to something more powerful.

Copy link
Contributor

github-actions bot commented Jan 10, 2025

Coverage Report for frontend

Status Category Percentage Covered / Total
🔵 Lines 85.49% 3577 / 4184
🔵 Statements 85.49% 3577 / 4184
🔵 Functions 44.85% 61 / 136
🔵 Branches 79.06% 204 / 258
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
skore-ui/src/dto.ts 100% 100% 100% 100%
skore-ui/src/models.ts 75% 20% 100% 75% 29-30, 32-33, 35-37
skore-ui/src/components/CrossValidationReportResults.vue 100% 100% 100% 100%
skore-ui/src/components/FloatingTooltip.vue 100% 100% 100% 100%
skore-ui/src/components/ImageWidget.vue 100% 100% 100% 100%
skore-ui/src/components/RichTextEditor.vue 100% 100% 100% 100%
skore-ui/src/components/SimpleButton.vue 91.3% 50% 100% 91.3% 1, 41
skore-ui/src/components/ToastNotification.vue 87.09% 64.28% 100% 87.09% 21, 32-33, 38-42
skore-ui/src/components/TreeAccordionItem.vue 83.96% 90% 20% 83.96% 23-27, 39-49, 59-60
skore-ui/src/services/api.ts 85.71% 61.53% 100% 85.71% 18-19, 45-48, 57-58, 92-95
skore-ui/src/services/utils.ts 96.87% 96.66% 93.75% 96.87% 199-201
skore-ui/src/stores/project.ts 72.2% 90% 59.09% 72.2% 34-37, 47-65, 73-80, 139-140, 248-254, 261-266, 273-278, 284-287, 300, 319-328, 334-336, 371-372
skore-ui/src/views/ComponentsView.vue 92.74% 100% 0% 92.74% 46-56, 62-87, 174-203, 207-216, 229-233, 237-243, 1384-1389, 1393-1400
skore-ui/src/views/project/ItemNote.vue 100% 100% 100% 100%
skore-ui/src/views/project/ProjectView.vue 74.48% 75% 0% 74.48% 28-52, 59, 90-91
Generated in workflow #81 for commit 6a15f27 by the Vitest Coverage Report Action

@rouk1 rouk1 changed the title feat(UI): Markdown editor feat(UI): Markdown editor to annotate item Jan 15, 2025
@rouk1 rouk1 mentioned this pull request Jan 15, 2025
4 tasks
- upgrade dependencies (eslint 9 \o/)
- new icons
- minimal kinnable ich text editor
Copy link
Contributor

github-actions bot commented Jan 16, 2025

Coverage

Coverage Report for backend
FileStmtsMissCoverMissing
venv/lib/python3.12/site-packages/skore
   __init__.py140100% 
   __main__.py8180%19
   exceptions.py30100% 
venv/lib/python3.12/site-packages/skore/cli
   __init__.py50100% 
   cli.py33385%104, 111, 117
   color_format.py43390%35–>40, 41–43
   launch_dashboard.py261539%36–57
   quickstart_command.py14750%37–51
venv/lib/python3.12/site-packages/skore/item
   __init__.py21191%46
   cross_validation_item.py1371093%27–42, 373
   item.py421369%91, 94, 98–118
   item_repository.py65592%12–13, 211–212, 235
   media_item.py70494%15–18
   numpy_array_item.py25193%15
   pandas_dataframe_item.py34195%15
   pandas_series_item.py34195%15
   polars_dataframe_item.py32194%15
   polars_series_item.py27194%15
   primitive_item.py27292%13–15
   sklearn_base_estimator_item.py33195%15
   skrub_table_report_item.py10186%11
venv/lib/python3.12/site-packages/skore/persistence
   __init__.py00100% 
   abstract_storage.py22195%130
   disk_cache_storage.py33195%44
   in_memory_storage.py200100% 
venv/lib/python3.12/site-packages/skore/project
   __init__.py30100% 
   create.py52888%116–122, 132–133, 140–141
   load.py23389%43–45
   open.py140100% 
   project.py68394%118, 152, 156
venv/lib/python3.12/site-packages/skore/sklearn
   __init__.py40100% 
   _base.py140298%171–>176, 186–187
   find_ml_task.py43196%71–>84, 83
   types.py20100% 
venv/lib/python3.12/site-packages/skore/sklearn/_estimator
   __init__.py100100% 
   metrics_accessor.py265497%149–158, 183–>236, 191, 434–>437, 783–>786
   report.py116099%212–>218, 220–>222
   utils.py11110%1–19
venv/lib/python3.12/site-packages/skore/sklearn/_plot
   __init__.py40100% 
   precision_recall_curve.py126297%200–>203, 313–314
   prediction_error.py75099%289–>297
   roc_curve.py95394%156, 167–>170, 223–224
   utils.py770100% 
venv/lib/python3.12/site-packages/skore/sklearn/cross_validation
   __init__.py20100% 
   cross_validation_helpers.py47490%104–>136, 123–126
   cross_validation_reporter.py35195%177
venv/lib/python3.12/site-packages/skore/sklearn/cross_validation/plots
   __init__.py00100% 
   compare_scores_plot.py29192%10, 45–>48
   timing_plot.py29194%10
venv/lib/python3.12/site-packages/skore/sklearn/train_test_split
   __init__.py00100% 
   train_test_split.py36294%16–17
venv/lib/python3.12/site-packages/skore/sklearn/train_test_split/warning
   __init__.py80100% 
   high_class_imbalance_too_few_examples_warning.py17378%16–18, 80
   high_class_imbalance_warning.py18288%16–18
   random_state_unset_warning.py11187%15
   shuffle_true_warning.py9091%44–>exit
   stratify_is_set_warning.py11187%15
   time_based_column_warning.py22189%17, 69–>exit
   train_test_split_warning.py5180%21
venv/lib/python3.12/site-packages/skore/ui
   __init__.py00100% 
   app.py25571%24, 53–58
   dependencies.py7186%12
   project_routes.py610100% 
venv/lib/python3.12/site-packages/skore/utils
   __init__.py00100% 
   _accessor.py70100% 
   _logger.py21484%14–18
   _patch.py11546%20–37
   _progress_bar.py280100% 
   _show_versions.py310100% 
venv/lib/python3.12/site-packages/skore/view
   __init__.py00100% 
   view.py50100% 
   view_repository.py16283%8–9
TOTAL239714593% 

Tests Skipped Failures Errors Time
459 3 💤 0 ❌ 0 🔥 51.709s ⏱️

@rouk1 rouk1 marked this pull request as ready for review January 16, 2025 13:57
@augustebaum augustebaum self-requested a review January 16, 2025 14:02
Copy link
Contributor

@augustebaum augustebaum left a comment

Choose a reason for hiding this comment

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

The note should be specific to an item version; right now the note stays the same regardless of the version

@rouk1
Copy link
Contributor Author

rouk1 commented Jan 16, 2025

The note should be specific to an item version; right now the note stays the same regardless of the version

This is fixed thanks for the report :)

Copy link
Contributor

@augustebaum augustebaum left a comment

Choose a reason for hiding this comment

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

Alright, good stuff!

@augustebaum augustebaum changed the title feat(UI): Markdown editor to annotate item feat(UI): Add markdown editor to annotate item Jan 16, 2025
@augustebaum augustebaum merged commit bd4bd09 into main Jan 16, 2025
17 of 19 checks passed
@augustebaum augustebaum deleted the markdown-editor branch January 16, 2025 17:14
@sylvaincom
Copy link
Contributor

Very nice, thanks for shipping this fast!

@glemaitre
Copy link
Member

Nice @rouk1

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.

4 participants