SRVOCF-1039: add file and folder deletion to the edit page - #148
Conversation
|
@pmeida: This pull request references SRVOCF-953 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pmeida The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
40bf02a to
135f86c
Compare
|
@pmeida: This pull request references SRVOCF-1039 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
b62c354 to
c93cf06
Compare
|
Topic for discussion:
|
| <style>{` | ||
| .file-actions-btn { visibility: hidden; } | ||
| .pf-v6-c-tree-view__list-item:hover > .pf-v6-c-tree-view__content .file-actions-btn { visibility: visible; } | ||
| .pf-v6-c-tree-view__list-item:hover:has(.pf-v6-c-tree-view__list-item:hover) > .pf-v6-c-tree-view__content .file-actions-btn { visibility: hidden; } | ||
| .pf-v6-c-tree-view__list-item:has(> .pf-v6-c-tree-view__content > .pf-v6-c-tree-view__node.pf-m-current) > .pf-v6-c-tree-view__content .file-actions-btn { visibility: visible; } | ||
| .pf-v6-c-tree-view__action { margin-inline-end: 0; } | ||
| `}</style> |
There was a problem hiding this comment.
The action button visibility is controlled by CSS rather than React state because the hover trigger lives on PatternFly's internal <li> element (.pf-v6-c-tree-view__list-item), which we don't render or control. There's no way to attach onMouseEnter/onMouseLeave to it without hacking the DOM.
I understand this is ugly and an outlier in our repo.
Moving to a separate CSS file could be cleaner.
Please let me know if you have a better way to achieve the same behaviour or if you are fine with having this block.
Adds a kebab menu action on each file tree entry that sends deleted entries to the GitHub Git Trees API with SHA=null, removing them from the repository on save. Adds backend, unit, and e2e tests for the deletion flow.
c93cf06 to
7fdf5e0
Compare
|
@pmeida: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
PUT /api/v1/func/{owner}/{name}/file- entries withdeleted=trueare pushed to GitHub withsha=nullFixes SRVOCF-1039
Checklist
docs/ARCHITECTURE.md(if there are relevant changes to our layered architecture)