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

Inline Modal Playbook Additions #1467

Merged
merged 58 commits into from
May 10, 2021
Merged

Inline Modal Playbook Additions #1467

merged 58 commits into from
May 10, 2021

Conversation

bh247484
Copy link
Contributor

@bh247484 bh247484 commented Apr 23, 2021

What does this PR do?

  • Typeahead
    • Enables createable select
    • Inline styling
    • Adds badge and small form pills
    • Adds plus icon to placeholder
  • Rich Text Editor
    • Inline styling
    • Option to move toolbar to bottom
  • Form Pill
    • Adds smaller size variant
  • Date Picker
    • Bug fixes
  • Text Input
    • Inline styling

Breaking Changes

Only adding props/features but needs regression testing.

Runway Ticket URL

Runway Story

How to test this

Check doc examples for each affected kit (listed above). Currently being alpha tested in Nitro.

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • URGENCY Please select a release milestone
  • DEPLOY Please add the Milano label when you are ready for a review.
  • SCREENSHOT Please add a screen shot or two.
  • SPECS Please cover your changes with specs.
  • READ DOCS Please make sure you have read and understand the Playbook Release Process

The normal release cut off deadline is 3p EDT each week. Please reach out to the release team if you have an urgent request or need a release off cycle.

@bh247484 bh247484 added the milano 20 MAX - Deploy this PR to a review environment via Milano label Apr 23, 2021
@bh247484 bh247484 added this to the 8.*.* ASYNC RELEASE milestone Apr 23, 2021
Copy link
Contributor

@thestephenmarshall thestephenmarshall left a comment

Choose a reason for hiding this comment

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

Checked it out a bit in the review env and everything looks good in all browsers. Let's get this one to alpha testing next!

@bh247484 bh247484 removed the milano 20 MAX - Deploy this PR to a review environment via Milano label Apr 28, 2021
<span>
{text}
<If condition={removeIcon}>
<span
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to make this a button?

@@ -166,6 +166,9 @@ const datePickerHelper = (config) => {
picker.input.style.caretColor = 'transparent'
picker.input.style.cursor = 'pointer'
}

// Fix event bubbling bug on wrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

Stupid I know but could you change this to "fixes"? I read it like a "Fix this" note.

const css = classnames(
`pb_form_pill_kit_${'primary'}`,
globalProps(props),
className
className,
size === 'small' ? 'small' : null,
Copy link
Contributor

@coleerikson coleerikson Apr 28, 2021

Choose a reason for hiding this comment

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

I think you could rewrite this using the classnames functionality. { 'small': size === 'small' }

const FormPillSize = (props) => {
return (

<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be a fragment?

@@ -1,7 +1,7 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname) do %>
class: object.classname + object.size_class) do %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I could be totally wrong but I think you could get away with this in the class generator. See below...

@@ -14,6 +15,10 @@ def classname
def display_text
name.downcase
end

def size_class
size == "small" ? " small" : ""
Copy link
Contributor

Choose a reason for hiding this comment

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

size == "small" ? "small" : null

@@ -6,6 +6,7 @@ class FormPill < Playbook::KitBase
prop :avatar_url
prop :name
prop :text
prop :size

def classname
generate_classname("pb_form_pill_kit", "primary", name, text)
Copy link
Contributor

Choose a reason for hiding this comment

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

generate_classname("pb_form_pill_kit", "primary", name, text, size_class)

@@ -53,6 +55,7 @@ const TextInput = (
const dataProps = buildDataProps(data)
const css = classnames([
'pb_text_input_kit',
inline ? 'inline' : null,
Copy link
Contributor

Choose a reason for hiding this comment

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

small classnames function I mentioned above.

@@ -41,6 +43,10 @@ def validation_data
def error_class
error ? " error" : ""
end

def inline_class
inline ? " inline" : ""
Copy link
Contributor

Choose a reason for hiding this comment

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

inline ? "inline" : null
You don't need the space I think if you use null instead of an empty string.

closeProps={removeProps}
marginRight="xs"
name={label}
size={multiKit === 'smallPill' ? 'small' : ''}
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 size={multiKit === 'smallPill' && 'small'} I think this will work for this. I could be wrong.

@@ -22,6 +31,10 @@ def classname
generate_classname("pb_typeahead_kit")
end

def inline_class
Copy link
Contributor

Choose a reason for hiding this comment

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

Include, if possible, in the generator like I mentioned.

@bh247484 bh247484 added the milano 20 MAX - Deploy this PR to a review environment via Milano label May 10, 2021
@bh247484 bh247484 merged commit ca035de into master May 10, 2021
@bh247484 bh247484 deleted the inline-exp branch May 10, 2021 15:04
@bh247484 bh247484 removed milano 20 MAX - Deploy this PR to a review environment via Milano in testing labels May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New Features, Props, & Variants (USED IN CHANGELOG)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants