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

Feat/vue featured suggestions #2221

Merged
merged 20 commits into from
Jun 23, 2023

Conversation

SavvyShah
Copy link
Contributor

@SavvyShah SavvyShah commented May 21, 2023

Notion card

Support featured suggestions in Vue Searchbox component like in React.

Example added in showcase #2216 PR under vue/examples/search-showcase/featured-suggestions

Docs PR

@github-actions github-actions bot added the vue label May 21, 2023
@mohdashraf010897
Copy link
Member

mohdashraf010897 commented May 24, 2023

@SavvyShah

  • the search icon shouldn’t show up beside the featured suggestions if the icon isn't set from the dashboard.

Copy link
Member

@mohdashraf010897 mohdashraf010897 left a comment

Choose a reason for hiding this comment

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

  • the search icon shouldn’t show up beside the featured suggestions if the iconUrl isn't set from the dashboard.

@SavvyShah
Copy link
Contributor Author

Review change has been done. Loom is included in the comments of notion card.

@SavvyShah
Copy link
Contributor Author

Check latest comments in notion for loom preview

@SavvyShah SavvyShah mentioned this pull request Jun 12, 2023
3 tasks
@github-actions github-actions bot added the web label Jun 13, 2023
Copy link
Member

@mohdashraf010897 mohdashraf010897 left a comment

Choose a reason for hiding this comment

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

See the comments,

Also please share a loom testing for various icon combinations, we have encountered issues with input padding in the past and thus we should make sure we are dealing with it right. You can refer to the react version for padding values.

The test icon combinations could be -

  • focusshortcuts icon + clear icon + voice search icon + search icon(left)
  • focusshortcuts icon + clear icon + voice search icon + search icon(right)
  • focusshortcuts icon + clear icon + search icon(right)
  • focusshortcuts icon + voice search icon + search icon(right)
  • focusshortcuts icon + voice search icon
  • focusshortcuts icon + clear icon
  • focusshortcuts icon + search icon(right)
  • clear icon + voice search icon
  • clear icon + voice search icon + search icon(right)
  • clear icon + search icon(right)
  • voice search icon + search icon(right)
  • voice search icon
  • clear icon
  • focusshortcuts icon

@@ -1125,7 +1125,7 @@ const SearchBox = defineComponent({
/>
);
}
return null
return ()=>(<span></span>)
Copy link
Member

Choose a reason for hiding this comment

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

@SavvyShah Doesn't return null work here? It would help if you can specify the reason to use empty span vs null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code in comment looks like below now.

return () => (
	<span
		style={{
			display: 'inline-block',
			height: '25px',
			width: leaveSpaceForIcon ? '25px' : 0,
		}}
	></span>
);

<img
style={{ maxHeight: '25px' }}
src={xss(item.iconURL)}
alt={item.value}
/>
);
}
return ()=>(<span></span>)
// Render an empty icon when no icon is provided from the dashboard
return ()=>(<span style={{display: 'inline-block',height: '25px', width: leaveSpaceForIcon?'25px': 0}}></span>)
Copy link
Member

Choose a reason for hiding this comment

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

@SavvyShah The formatting seems a bit off, haven't you turned on lint on your machine? I have seen this in the other PR(s) as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The above comment is the same.

return () => (
	<span
		style={{
			display: 'inline-block',
			height: '25px',
			width: leaveSpaceForIcon ? '25px' : 0,
		}}
	></span>
);

@mohdashraf010897 mohdashraf010897 changed the base branch from next to vue-ai-chat-box June 19, 2023 10:27
@mohdashraf010897 mohdashraf010897 self-requested a review June 23, 2023 03:15
@mohdashraf010897 mohdashraf010897 merged commit ea1753b into vue-ai-chat-box Jun 23, 2023
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.

2 participants