-
Notifications
You must be signed in to change notification settings - Fork 4
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
Answers -> Search 2: headless unique customer components #113
Conversation
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.
we should point this to develop, or a feature branch like how Alex did for search-core!
src/search-headless.ts
Outdated
/** | ||
* Common utility functions for manipulating Answers-related data. | ||
*/ | ||
public readonly utilities = answersUtilities; |
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.
lets rename to searchUtilities? (ignore this if you are planning on changing this in part 2..)
Pull Request Test Coverage Report for Build 2652011560Details
💛 - Coveralls |
technically the imports/exports from updated search-core are also consumer facing, I would update the PR title! |
I told this to Alex too - could we move the package.json changes to their own PR? Otherwise it's difficult to review a PR this large - github really struggles here. Changing the package.json package name also changes all of the doc links so that's why literally every doc file changes |
Is there an easy way to split it into a new PR? |
I would still keep this PR/branch - after the package.json PR is merged in you can do a rebase with a |
You can make a new branch, and git cherry-pick the changes you want into that new branch. I like to use sublime merge for this. You could also just copy paste the new package.json file since that should be the only change. |
ok! new PR here: #115 |
… into rename-search merge
src/deprecated.ts
Outdated
@@ -0,0 +1,29 @@ | |||
import { searchUtilities, provideHeadless } from "."; |
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.
eslint warnings, single quotes for import statements. (should add eslint github action to this repo...)
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.
There were some other lint warnings like dual exports or something which is probably why it's not a github action :)
src/deprecated.ts
Outdated
* | ||
* @deprecated answersUtilities has been deprecated and renamed to searchUtilities | ||
*/ | ||
export const answersUtilities = searchUtilities; |
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.
remember to import these stuff into index.ts and export them there. Otherwise, user wouldn't have access to these deprecated stuff
src/deprecated.ts
Outdated
* | ||
* @deprecated provideAnswersHeadless has been deprecated and renamed to provideHeadless | ||
*/ | ||
export const provideAnswersHeadless = provideHeadless; |
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.
eslint warnings, extra space before export
in this file, and in the line below here
@@ -1,7 +1,7 @@ | |||
import { Matcher, QuerySource, QueryTrigger } from '@yext/answers-core'; |
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.
can we rename this file?
could you remove the tests/.DS_Store file and also add it to the gitignore (I think you can just add a line with |
lmao I can't figure out how to remove it - the delete button is grayed out and it's not in VSCode even after I pull (?) I added to gitignore though |
.gitignore
Outdated
temp/ | ||
.DS_STORE |
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.
the casing is off here! it's .DS_Store
src/search-headless.ts
Outdated
/** | ||
* Common utility functions for manipulating Answers-related data. | ||
* Common utility functions for manipulating Search-related data. | ||
*/ | ||
public readonly utilities = answersUtilities; |
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.
bumping yen's comment to rename to searchUtilities!
@@ -66,7 +66,7 @@ const mockedCore: any = { | |||
filterSearch: jest.fn(() => Promise.resolve({})) | |||
}; | |||
|
|||
const answers = new AnswersHeadless(mockedCore, mockedStateManager, new HttpManager()); | |||
const answers = new SearchHeadless(mockedCore, mockedStateManager, new HttpManager()); |
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.
Can we rename this variable too?
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.
there's like a million variables named answers so Tom said we'd rename those in a later phase!
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.
ooh gotcha!
src/models/slices/query.ts
Outdated
@@ -19,7 +19,7 @@ export interface QueryState { | |||
*/ | |||
queryTrigger?: QueryTrigger, | |||
/** | |||
* The source of the query (from a standard Answers integration, an Answers | |||
* The source of the query (from a standard Search integration, an Search |
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.
an -> a
src/models/state-manager.ts
Outdated
@@ -3,7 +3,7 @@ import { State } from './state'; | |||
import StateListener from './state-listener'; | |||
|
|||
/** | |||
* Manages the information contained in the state for an AnswersHeadless instance. | |||
* Manages the information contained in the state for an SearchHeadless instance. |
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.
an -> a
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.
lgtm!
Renamed all new customer-facing components, updated package.json. Part 3 will be updating imports/exports from updated
search-core
J=SLAP-2204
TEST=auto