Skip to content

Docked composer #3062

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
merged 12 commits into from
Aug 30, 2022
Merged

Conversation

2FALockedMeOutOfMyAcct
Copy link
Contributor

@2FALockedMeOutOfMyAcct 2FALockedMeOutOfMyAcct commented Aug 26, 2022

Additional description

Adds Docked Composer to DSR
Screen Shot 2022-08-26 at 10 29 48 AM


CONTRIBUTOR checklist (do not remove)

Please complete for every pull request

  • First-time contributors should sign the Contributor License Agreement. It's a fancy way of saying that you are giving away your contribution to this project. If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
  • npm run lint:fix has been run and linting passes.
  • Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
  • Tests have been added for new props to prevent regressions in the future. See readme.
  • Review the appropriate Storybook stories. Open http://localhost:9001/.
  • Review tests are passing in the browser. Open http://localhost:8001/.
  • Review markup conforms to SLDS by looking at DOM snapshot strings.

REVIEWER checklist (do not remove)

  • CircleCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
  • Tests have been added for new props to prevent regressions in the future. See readme.
  • Review the appropriate Storybook stories. Open http://localhost:9001/.
  • The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
  • Review tests are passing in the browser. Open http://localhost:8001/.
  • Review markup conforms to SLDS by looking at DOM snapshot strings.
Required only if there are markup / UX changes
  • Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
  • Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
  • Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
  • While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

@welcome
Copy link

welcome bot commented Aug 26, 2022

Thanks for opening this pull request! 💯

This is a community-driven project, and we can't do it without your participation. Please check out our contributing guidelines and review the Contributor Checklist if you haven't already, to make sure everything is squared away. CircleCI will take about 10 minutes to run through the same items that are on the Contributor checklist with a pass/fail check below. Please fix any issues that cause CircleCI to fail or ask for clarification--we try, but sometimes the errors can be unclear.
A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread. To ensure codebase quality, large code line changes may take more than 2 weeks to review, but may take longer depending on the number of pull requests in the queue. Feel free to ask for a status update at any time--you won't be bothering anyone.
Once feedback has been given, please reply to the feedback giver once the feedback on been addressed, so that they can continue the review.
If you need a release while you are waiting for a code review, you can publish a built tag to your own fork. See directions in the release README.

<div className="slds-col_bump-left slds-shrink-none">
<Button
id={`${this.getId()}-minimize-button`}
title="Minimize"
Copy link
Contributor

Choose a reason for hiding this comment

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

should we localize titles?

* Text to display in the header.
* _Tested with snapshot testing._
*/
header: PropTypes.string,
Copy link
Contributor

@meizibupt meizibupt Aug 26, 2022

Choose a reason for hiding this comment

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

should we allow user to add a node for header too? so they can change icon etc

import Button from '../button';

const propTypes = {
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

we can also add a css class prop to allow overriding css

static displayName = 'DockedComposerExample';

state = {
isOpen: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

This naming convention is a bit confusing, do you think isExpanded and isOpen would be a bit less ambiguous?

gfyhui added 2 commits August 29, 2022 12:03
…poser state, add class name parameter, add assitive text parameters, add story for minimized state
@2FALockedMeOutOfMyAcct
Copy link
Contributor Author

Minimized and expanded states:
Screen Shot 2022-08-29 at 12 14 29 PM
Screen Shot 2022-08-29 at 12 14 43 PM
3 votes in favor of this behavior: @gfyhui , @alexxpan and Jonathon

meizibupt
meizibupt previously approved these changes Aug 29, 2022
alexxpan
alexxpan previously approved these changes Aug 29, 2022
meizibupt
meizibupt previously approved these changes Aug 29, 2022
garygong
garygong previously approved these changes Aug 29, 2022
import { mount } from 'enzyme';
import IconSettings from '../../icon-settings';

// Import your internal dependencies (for example):
Copy link
Contributor

Choose a reason for hiding this comment

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

These comments seem like they can be removed

Copy link
Contributor

@interactivellama interactivellama left a comment

Choose a reason for hiding this comment

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

First, this is a great pull request! I did not pull this down to manually test it, but did left a few minor request and referenced the overview doc. Thank you for this great contribution!

}}
id="docked-composer"
events={{
onMinimize: this.handleMinimize,
Copy link
Contributor

Choose a reason for hiding this comment

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

<section
className={`slds-docked-composer slds-grid slds-grid_vertical ${sectionClassName}`}
role="dialog"
aria-labelledby="dialog-heading-id-1"
Copy link
Contributor

@interactivellama interactivellama Aug 29, 2022

Choose a reason for hiding this comment

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

All ids should be prefixed by an id or a random id if not set by the use. You are doing this in other locations: this.generatedId

{this.props.isOpen ? (
<Button
id={`${this.getId()}-minimize-button`}
title={this.props.assistiveText?.minimizeButton || 'Minimize'}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think was would be typically done by a default props object, so no one has to search render functions for text literals.

title={this.props.assistiveText?.minimizeButton || 'Minimize'}
assistiveText={{
icon:
this.props.assistiveText?.minimizeButton || 'Minimize',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

) : (
<Button
id={`${this.getId()}-expand-button`}
title={this.props.assistiveText?.expandButton || 'Expand'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same.

id={`${this.getId()}-expand-button`}
title={this.props.assistiveText?.expandButton || 'Expand'}
assistiveText={{
icon: this.props.assistiveText?.expandButton || 'Expand',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same.

…enerated id for all components, use default props
@interactivellama
Copy link
Contributor

@alexzherdev Merge when you ready to.

@alexzherdev
Copy link
Contributor

Not super important for this simple component, but I wonder if we should encourage new components to be written as functions. At this point I don't think there are any pre-16.8 consumers?

@alexzherdev alexzherdev merged commit 40e14de into salesforce:master Aug 30, 2022
@welcome
Copy link

welcome bot commented Aug 30, 2022

Congrats on merging your first pull request to Design System React! 🎉
If you have a moment, please fill out this five question survey, we would appreciate it.
On behalf of Salesforce's customers, partners, product specialists and employees, we would like offer sincere thanks and appreciation for helping make our user experience better. We look forward to working with you more in the future.
This definitely calls for a high five! Alt High Five

@2FALockedMeOutOfMyAcct 2FALockedMeOutOfMyAcct deleted the docked-composer branch August 31, 2022 00:02
@interactivellama
Copy link
Contributor

@alexzherdev I'm cool with that. Please update the docs when convenient. I believe DataTable has hooks in it.

@interactivellama
Copy link
Contributor

Also, love the account name: @2FALockedMeOutOfMyAcct

@2FALockedMeOutOfMyAcct
Copy link
Contributor Author

Thanks for the reviews and merging. When will the next DSR release be @interactivellama @alexzherdev ?

@alexzherdev
Copy link
Contributor

@interactivellama is the automated release build still broken?

@interactivellama
Copy link
Contributor

Yes.

I could use some help in triaging the authentication, since the security protections went up.

@interactivellama
Copy link
Contributor

@2FALockedMeOutOfMyAcct Please open a release PR and I will pull down and push up a tag.

@alexzherdev
Copy link
Contributor

@interactivellama I opened #3063 if that's what you meant?

@interactivellama
Copy link
Contributor

I'll try to get this out by End of week.

@interactivellama
Copy link
Contributor

@interactivellama
Copy link
Contributor

There are additional issues with the NPM publishing process. I'm in talks with Jim in OSS group on getting different permissions set up. The tag is present in Github but we do not have a NPM package up today.

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.

7 participants