-
Notifications
You must be signed in to change notification settings - Fork 63
[ENG-3243][ENG-3417] Revisions bugfixes #1359
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
Merged
futa-ikeda
merged 7 commits into
CenterForOpenScience:release/21.10.0
from
futa-ikeda:revisions-bugfixes
Nov 23, 2021
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
36cdf82
Better color contrast for create button
futa-ikeda 98aaecb
Wording changes
futa-ikeda 592ea73
Another wording change
futa-ikeda 9e35eff
Close dropdown when choosing revision in dropdown
futa-ikeda 417b21e
Add data-test selectors to delete-modal
futa-ikeda 66d21f4
Add quick test for delete-button
futa-ikeda 08ed562
Remove redundant label for registrations needing moderation
futa-ikeda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
lib/osf-components/addon/components/registries/update-dropdown/list-item/template.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/integration/components/delete-button/component-test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { click, render } from '@ember/test-helpers'; | ||
| import { hbs } from 'ember-cli-htmlbars'; | ||
| import { setupRenderingTest } from 'ember-qunit'; | ||
| import { module, test } from 'qunit'; | ||
|
|
||
| module('Integration | Component | delete-button', hooks => { | ||
| setupRenderingTest(hooks); | ||
|
|
||
| test('it renders', async function(assert) { | ||
| await render(hbs` | ||
| <DeleteButton | ||
| @buttonLabel='Button here!' | ||
| @modalTitle='Head' | ||
| @modalBody='Shoulders' | ||
| @cancelButtonText='Knees' | ||
| @confirmButtonText='Toes' | ||
| /> | ||
| `); | ||
| assert.dom('[data-test-delete-button]').hasText('Button here!'); | ||
| await click('[data-test-delete-button]'); | ||
| assert.dom('[data-test-delete-modal-header]').containsText('Head'); | ||
| assert.dom('[data-test-delete-modal-body]').hasText('Shoulders'); | ||
| assert.dom('[data-test-cancel-delete]').hasText('Knees'); | ||
| assert.dom('[data-test-confirm-delete]').hasText('Toes'); | ||
| await click('[data-test-confirm-delete]'); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do something more simple like
@onClick={{dd.close}}, but doing so caused the page to do a full load every time. I don't think this is the best way of closing the dropdown on click, but other attempts have either run into the problem where it does a full app load as opposed to a transition, or doesn't show which revision is the currently selected one (like when using<OsfLink>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason why it does a full page load ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure why. I tried messing around with some different approaches, but basically anything that closed the dropdown before the transition finished would trigger a full page load. I'm guessing there's something about how the transition is being called that gets messy when the dropdown is closed, but I couldn't quite figure out how to remedy that.