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: Add delete highlights implementation #963

Merged
merged 9 commits into from
Mar 10, 2023
Merged

Conversation

OgDev-01
Copy link
Contributor

@OgDev-01 OgDev-01 commented Mar 7, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR:

  • Adds delete button to delete a highlight
  • Adds alert dialog to prompt a user to confirm delete action or cancel

Related Tickets & Documents

Fixes #906

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Mar 7, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit 1f78d65
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/640b3ade7933f40008c4e110
😎 Deploy Preview https://deploy-preview-963--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 7, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 1f78d65
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/640b3adecb3f6900083b8861
😎 Deploy Preview https://deploy-preview-963--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@OgDev-01 OgDev-01 marked this pull request as draft March 7, 2023 12:41
@OgDev-01 OgDev-01 marked this pull request as ready for review March 8, 2023 15:25
@OgDev-01 OgDev-01 added the needs review PRs that need review from core engineering team label Mar 8, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Watched Files

This pull request modifies specific files that require careful review by the maintainers.

Files Matched

  • npm-shrinkwrap.json
  • package.json

Copy link
Contributor

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

Functionally works. List is not refreshed, but may be covered in #957

Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

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

Missed this in the design review, but can we light the delete button to match what is on the inisights page. Link to Figma

Screen Shot 2023-03-08 at 9 07 57 AM

cc @getaheaddev

update: on hover is not great. Should not be orange.
Screen Shot 2023-03-08 at 10 28 07 AM

Copy link
Contributor

@nightknighto nightknighto left a comment

Choose a reason for hiding this comment

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

Just some little details

lib/hooks/useFetchUserHighlights.ts Outdated Show resolved Hide resolved
lib/hooks/deleteHighlight.ts Show resolved Hide resolved
@bdougie bdougie added requested changes and removed needs review PRs that need review from core engineering team labels Mar 8, 2023
@OgDev-01 OgDev-01 requested review from nightknighto and bdougie March 9, 2023 13:40
@OgDev-01 OgDev-01 added needs review PRs that need review from core engineering team and removed requested changes labels Mar 9, 2023
const error = new Error("HttpError");

error.message = `${res.status} ${res.statusText}`;
error.stack = JSON.stringify(await res.json());
Copy link
Contributor

@nightknighto nightknighto Mar 9, 2023

Choose a reason for hiding this comment

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

Maybe we should start using axios to automatically throw errors on non-ok requests. Something for the future.

Copy link
Contributor

@nightknighto nightknighto left a comment

Choose a reason for hiding this comment

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

LGTM

@brandonroberts
Copy link
Contributor

@OgDev-01 resolve merge conflicts and this is good to go

@bdougie bdougie added ready-to-merge and removed needs review PRs that need review from core engineering team labels Mar 10, 2023
@brandonroberts brandonroberts merged commit 10575f1 into beta Mar 10, 2023
@brandonroberts brandonroberts deleted the 906-delete-highlight branch March 10, 2023 14:19
github-actions bot pushed a commit that referenced this pull request Mar 10, 2023
## [1.34.0-beta.6](v1.34.0-beta.5...v1.34.0-beta.6) (2023-03-10)

### πŸ• Features

* add delete highlight implementation ([#963](#963)) ([10575f1](10575f1)), closes [#906](#906)
@github-actions
Copy link
Contributor

πŸŽ‰ This PR is included in version 1.34.0-beta.6 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Mar 10, 2023
## [1.34.0](v1.33.0...v1.34.0) (2023-03-10)

### πŸ• Features

* add custom tooltip to pr list icon ([#962](#962)) ([44fa050](44fa050)), closes [#955](#955)
* add delete highlight implementation ([#963](#963)) ([10575f1](10575f1)), closes [#906](#906)
* implement highlight's permanent link ([#957](#957)) ([78ad176](78ad176)), closes [#895](#895) [#950](#950)
* remove the repo click to filter feature & link to github ([#989](#989)) ([6f62b46](6f62b46)), closes [#983](#983)

### πŸ§‘β€πŸ’» Code Refactoring

* add invalid pull url feedback ([#992](#992)) ([28fe15c](28fe15c)), closes [#961](#961)

### πŸ› Bug Fixes

* add Rust to interests options and combine utility function ([#977](#977)) ([28a5270](28a5270)), closes [#976](#976)
* add skeleton wrapper atom to storybook ([#990](#990)) ([780d345](780d345))
* adds more placeholder ([#971](#971)) ([bf5daa7](bf5daa7))
* adjust input body overlap when editing a highlight ([#991](#991)) ([1512f7d](1512f7d))
* fix pointer-events when closing edit dialog ([#987](#987)) ([df6eb2b](df6eb2b))
* update local time option from user settings ([#951](#951)) ([c91a513](c91a513))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.34.0-beta.6](open-sauced/app@v1.34.0-beta.5...v1.34.0-beta.6) (2023-03-10)

### πŸ• Features

* add delete highlight implementation ([#963](open-sauced/app#963)) ([10575f1](open-sauced/app@10575f1)), closes [#906](open-sauced/app#906)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.34.0](open-sauced/app@v1.33.0...v1.34.0) (2023-03-10)

### πŸ• Features

* add custom tooltip to pr list icon ([#962](open-sauced/app#962)) ([44fa050](open-sauced/app@44fa050)), closes [#955](open-sauced/app#955)
* add delete highlight implementation ([#963](open-sauced/app#963)) ([10575f1](open-sauced/app@10575f1)), closes [#906](open-sauced/app#906)
* implement highlight's permanent link ([#957](open-sauced/app#957)) ([78ad176](open-sauced/app@78ad176)), closes [#895](open-sauced/app#895) [#950](open-sauced/app#950)
* remove the repo click to filter feature & link to github ([#989](open-sauced/app#989)) ([6f62b46](open-sauced/app@6f62b46)), closes [#983](open-sauced/app#983)

### πŸ§‘β€πŸ’» Code Refactoring

* add invalid pull url feedback ([#992](open-sauced/app#992)) ([28fe15c](open-sauced/app@28fe15c)), closes [#961](open-sauced/app#961)

### πŸ› Bug Fixes

* add Rust to interests options and combine utility function ([#977](open-sauced/app#977)) ([28a5270](open-sauced/app@28a5270)), closes [#976](open-sauced/app#976)
* add skeleton wrapper atom to storybook ([#990](open-sauced/app#990)) ([780d345](open-sauced/app@780d345))
* adds more placeholder ([#971](open-sauced/app#971)) ([bf5daa7](open-sauced/app@bf5daa7))
* adjust input body overlap when editing a highlight ([#991](open-sauced/app#991)) ([1512f7d](open-sauced/app@1512f7d))
* fix pointer-events when closing edit dialog ([#987](open-sauced/app#987)) ([df6eb2b](open-sauced/app@df6eb2b))
* update local time option from user settings ([#951](open-sauced/app#951)) ([c91a513](open-sauced/app@c91a513))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add delete button to the highlights
4 participants