BryanWilhite / Songhay.Blog

My current technical blogging solution for my public, self-education.
MIT License
0 stars 1 forks source link

Azure search feature is missing #6

Closed BryanWilhite closed 6 years ago

BryanWilhite commented 6 years ago

you may have to start here old boy: http://songhayblog.azurewebsites.net/blog/entry/setting-up-an-azure-search-json-blob-indexer-with-api-version-2015-02-28-preview

BryanWilhite commented 6 years ago

according to the Tavis Software docs, the query string format is in this form:

"UriTemplates": {
    "search-component":
        "{componentName}{?api-version}",
    "search-component-item":
        "{componentName}/{itemName}{?api-version}",
    "search-docs":
        "indexes/{indexName}/docs{?api-version,search}"
}

instead of this form:

"UriTemplates": {
    "search-component":
        "{componentName}?api-version={apiVersion}",
    "search-component-item":
        "{componentName}/{itemName}?api-version={apiVersion}",
    "search-docs":
        "indexes/{indexName}/docs/search?api-version=2015-02-28"
}

where, according to the Azure Portal, apiVersion = 2017-11-11

BryanWilhite commented 6 years ago

Because I have logged this issue, this form might be a temporary substitute:

"UriTemplates": {
    "search-component":
        "{componentName}{?api_version}",
    "search-component-item":
        "{componentName}/{itemName}{?api_version}",
    "search-docs":
        "indexes/{indexName}/docs{?api_version,search}"
}

and consumers have to ‘remember’ to change api_version to api-version.

BryanWilhite commented 6 years ago

the last two commits, faf14288fbbb389f74bffd1afa77b28cd464a809 and 60ff0f93877e9201d40a202a31c29690e3539b9b, address this issue; also builds have been failing because VSTS is out of minutes (and CI should have been disabled)

BryanWilhite commented 6 years ago

i totally forgot i was using Window.sessionStorage for storing RestPagingMetadata in Angular JS; in Angular, this article suggests that it is a no, no: “Angular 5 – How to access Window, Document and other browser types in Angular Universal

BryanWilhite commented 6 years ago

currently search looks like this:

image

but, now, i think it should look like the Index list view:

image

this move will allow me to use the pagination-controls instead of reinventing pagination

BryanWilhite commented 6 years ago

i remind myself that the Index app is not using mat-paginator: it is using NgxPaginationModule [GitHub]

BryanWilhite commented 6 years ago

switched to NgxPaginationModule:

image

back to same CSS layout problem before making the switch; once this is resolved issue should be resolved

BryanWilhite commented 6 years ago

the entry flex-layout is also not behaving as expected: the content is pushing the entry body-content div to the horizontal margins; we can see this div collapse when the content is removed:

image

this flex-layout issue is definitely related to #15

BryanWilhite commented 6 years ago

i am questioning why i need to use flex-layout for Blog search/entry views; to save myself time (used to re-acquaint myself again with flex-layout) i will proceed with a layout that does not use flex-layout-container, fx* attributes, etc.

BryanWilhite commented 6 years ago

this huge screenshot shows that the ‘NG host’ (app-search) is not taking up the width of the router-outlet block display:

image

the annoying CSS reason why this is important is that, say, a setting of width: 90% will be relative to this host not the parent window

BryanWilhite commented 6 years ago

i now realize (after several days) that this angular-related CSS issue requires the use of the :host pseudo class; at the component level this CSS would be the fix:

:host(app-search) {
    width: 100%;
}

but i assert that this width should be the default for all components (based on my current understanding of CSS in modern Angular); i have posed a question on StackOverflow to address the possibility of setting a default :host selector

it looks like i started using :host about three months ago but promptly forgot about it

BryanWilhite commented 6 years ago

brutal. search released.

image

image