Skip to content

Commit

Permalink
Merge pull request #519 from b0ink/docs/migrate/comments-modal
Browse files Browse the repository at this point in the history
docs: comments-modal migration component review
  • Loading branch information
satikaj authored Jul 30, 2024
2 parents 05bbd46 + 0d7fe16 commit 089f7f7
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/OnTrack/UI Enhancement/Component Reviews/comments-modal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Ontrack Component review

## Team Member Name

Eliya G | s222313935

## Component Name

- `comments-modal.coffee`
- `comments-modal.tpl.html`
- `comments-modal.scss`

## Component purpose

The purpose of `comments-modal` is to display images and PDFs from task comments as a fullscreen
modal popup, allowing users to view the content without having to download or open it in another
tab.

## Component outcomes and interactions

Users can click on the image or `view PDF` comment on task which triggers `comments-modal` to popup
with the enlarged image, or an embedded PDF. `comments-modal` accepts two objects:

```typescript
@Input() commentType: string; // either 'image' or 'pdf'
@Input() commentResourceUrl: string; // the url to the image or pdf
```

## Component migration plan

I will be following
[doubtfire-web's Migration Guide](https://github.com/thoth-tech/doubtfire-web/blob/e70f4c7cd1395eaab942ee389788f75f92e985c9/MIGRATION-GUIDE.md)
and refer to existing components already migrated to TypeScript to ensure my code follows the same
code style & conventions.

Original (Image): ![comments-modal-image-original](Resources/comments-modal-image-original.jpg)

Original (PDF): ![comments-modal-pdf-original](Resources/comments-modal-pdf-original.jpg)

## Component Post-Migration

Migrated (Image): ![comments-modal-image-migrated](Resources/comments-modal-image-migrated.jpg)

Migrated (PDF): ![comments-modal-image-migrated](Resources/comments-modal-pdf-migrated.jpg)

0 comments on commit 089f7f7

Please sign in to comment.