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
Manage Students Table: UI for cog icon drop down in action header cell #21107
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
de3de57
clicking the cog icon opens a QuickActionsBox to edit all and control…
Erin007 065025c
fix merge conflict
Erin007 a0024c8
remove redundant styles, better name stories
Erin007 f7a63a1
remove Radium, use QuickActionsCellType.type instead of strings
Erin007 f99137a
fix merge conflict
Erin007 c720eb6
remove negative margin in favor of lineHeight
Erin007 7d9e5cf
use QuickActionsCellType
Erin007 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
29 changes: 29 additions & 0 deletions
29
apps/src/templates/manageStudents/ManageStudentsActionsHeaderCell.jsx
This file contains 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,29 @@ | ||
import React, {Component} from 'react'; | ||
import QuickActionsCell from "../tables/QuickActionsCell"; | ||
import PopUpMenu, {MenuBreak} from "@cdo/apps/lib/ui/PopUpMenu"; | ||
import i18n from '@cdo/locale'; | ||
|
||
export default class ManageStudentsActionsHeaderCell extends Component { | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<QuickActionsCell | ||
type="header" | ||
> | ||
<PopUpMenu.Item | ||
onClick={() => console.log('edit all was clicked!')} | ||
> | ||
{i18n.editAll()} | ||
</PopUpMenu.Item> | ||
<MenuBreak/> | ||
<PopUpMenu.Item | ||
onClick={() => console.log('control project sharing was clicked!')} | ||
> | ||
{i18n.controlProjectSharing()} | ||
</PopUpMenu.Item> | ||
</QuickActionsCell> | ||
</div> | ||
); | ||
} | ||
} |
This file contains 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 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 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 |
---|---|---|
|
@@ -7,8 +7,8 @@ export default storybook => { | |
.storiesOf('QuickActionsCell', module) | ||
.addStoryTable([ | ||
{ | ||
name: 'QuickActionsCell', | ||
description: 'Shown with 2 QuickActions as children', | ||
name: 'QuickActionsCell - default body', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice additions to storybook here. |
||
description: 'Shown with 2 QuickActions as children, the default body cell has a down chevron', | ||
story: () => ( | ||
<QuickActionsCell> | ||
<PopUpMenu.Item | ||
|
@@ -25,5 +25,26 @@ export default storybook => { | |
</QuickActionsCell> | ||
) | ||
}, | ||
{ | ||
name: 'QuickActionsCell - header', | ||
description: 'Override the default cheveron down icon for use in the header cell', | ||
story: () => ( | ||
<QuickActionsCell | ||
type="header" | ||
> | ||
<PopUpMenu.Item | ||
onClick={() => {console.log("clicked");}} | ||
> | ||
{"Action 1"} | ||
</PopUpMenu.Item> | ||
<MenuBreak/> | ||
<PopUpMenu.Item | ||
onClick={() => {console.log("clicked");}} | ||
> | ||
{"Action 2"} | ||
</PopUpMenu.Item> | ||
</QuickActionsCell> | ||
) | ||
}, | ||
]); | ||
}; |
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.
If you change this line to:
import QuickActionsCell, {QuickActionsCellType} from "../tables/QuickActionsCell";
Then on line 12, you can use:
type={QuickActionsCellType.header}