listing-form-sidebar-help (visit https://dev03.beenest.io/host/listings/87134/listing_info)#113
Conversation
| pricing_availability: 'pricing availability header', | ||
| checkin_details: 'checkin details header', | ||
| } | ||
|
|
There was a problem hiding this comment.
looking into consolidating properties based on each crumb. seems like there are a lot of declared objects with the crumb as the key.
|
|
||
| const Title = () => ( | ||
| <div> | ||
| <p>This is ListingName Info</p> |
There was a problem hiding this comment.
I'm wondering if these should e more use-friendly since they're consumer facing? Maybe something like This is the listing title. Same for the ones below this one:
This is the description for the listing.
This is the country the listing is located in
This is the listing's cover photo
..etc
There was a problem hiding this comment.
oh these were just placeholders haha. The scaffolding was more of the goal of this PR, prob could have been more clear soz.
There was a problem hiding this comment.
updated match the listing doc: https://docs.google.com/document/d/1w1RCVl9lIHqGA5UOVk3B0zqgRG3qSDBlfsQP_iiF0hg/edit#
some fields don't have explanations -- left them blank for now.
|
|
||
| const AsideHeaders: AsideHeadersInterface = { | ||
| listing_info: 'Let’s get started! This section will inform guests about where they’ll be staying and what to expect. The more descriptive, the better.', | ||
| accommodations: 'accommodations header', |
There was a problem hiding this comment.
Wondering if we need the word header at the end of these?
There was a problem hiding this comment.
placeholders again -- I'll swap in the actual headers
|
This is looking good! 👍 to using |
|
Most field helpers have been filled out. Still improving the content with Amy on Tuesday but for the most part, the structure is there. Feel free to comment on the smallest details / typos; be as nitpicky as possible (within reason) thx! 😄 |
| <InputWrapper> | ||
| <Field | ||
| name="sleepingArrangement" | ||
| onFocus={() => setFocus('sleepingArrangement')} |
There was a problem hiding this comment.
might be a little easier to manage these as enums so you can just change it in one place
There was a problem hiding this comment.
updated to use LISTING_FIELDS enum
| <h4>Examples:</h4> | ||
| <br /> | ||
| <div className="images-container"> | ||
| <LazyImage className="image-container--horizontal" src="https://s3-us-west-2.amazonaws.com/beenest-public/images/photo-examples/Do_LA_Bedroom.jpg" /> |
There was a problem hiding this comment.
small comment but can we use the https://static.beenest.com url for these?
|
just a few things that might not be in the scope of this pr:
somethings we can change in this pr: |
|
also, is there a reason why the help description is not highlightable? |
|
reason help text isn't highlightable is |
|
good calls. Will update |
| </ListItem> | ||
| <ListItem noHover prefixColor="correct" start="tiny"> | ||
| <Svg className="prefix" src="utils/check-circle" /> | ||
| <span>Do provide multiple angles</span> |
There was a problem hiding this comment.
Since this is preceded with a "Do:" (the h4 above) I'd just say "Provide multiple angles" here
| path="/host/listings/:id/accommodations" | ||
| render={() => <AccommodationsForm {...FormikProps} />} | ||
| render={() => ( | ||
| <AccommodationsForm {...FormikProps} ListingField={ListingField} setFocus={this.handleFocus} /> |
There was a problem hiding this comment.
Passing in the ListingField enum as a prop here feels funny; could ListingField just be exported from somewhere appropriate and shared by the various form pages?
There was a problem hiding this comment.
was thinking the same. Any suggestions on where it belongs? I was thinking networking/listings but it might be out of scope for that file
There was a problem hiding this comment.
networking/listings was my first thought as well. Agree that it isn't ideal w.r.t. the scope of that file; maybe leave it there with a TODO prompting us to move it when we have a more appropriate place for form descriptions?
There was a problem hiding this comment.
sgtm. this should make the form much cleaner!
|
|
||
| checkInTime: <CheckInTime />, | ||
| checkOutTime: <CheckOutTime />, | ||
| houseRules: <HouseRules />, |
There was a problem hiding this comment.
I really like this approach!
Would [ListingField.HOUSE_RULES]: <HouseRules /> make sense here?
There was a problem hiding this comment.
👍 Oh ya definitely could use that here as well
| import LazyImage from 'shared/LazyImage'; | ||
|
|
||
| interface ListingHelpTextInterfaceInterface { | ||
| [name: string]: React.ReactNode; |
There was a problem hiding this comment.
ListingHelpTextInterfaceInterface gives me many giggles. Can we name this ListingHelpTextInterface and change the returned const to ListingHelpText? That gives me no giggles at all.
Or even just ListingHelp
Oh, and corollary to comment below, think this could be:
[name: ListingField]: React.ReactNode;
...to leverage type-checking a little more.
There was a problem hiding this comment.
oops InterfaceInterface was from me being vscode trigger happy. good catch!
There was a problem hiding this comment.
condensed filename to ListingHelp
tried to use the enum in building the interface but typescript doesn't like it

Looked at few sources and it might require some golfing.
microsoft/TypeScript#5683
https://stackoverflow.com/questions/50849359/how-can-i-use-a-string-enum-type-as-a-computed-property-name-in-an-interface
|
A few minor suggestions inline. This looks great and I liked testing it! |
Description
Why did you write this code?
Add text helpers to the listing form side bar. Mostly just have the scaffolding down and can make a separate PR for full detailed descriptions.
How to Test
Which devices did you test on?