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

Enhancement/make selector sticky #84

Merged
merged 23 commits into from
Aug 22, 2023
Merged

Conversation

osala-eng
Copy link
Contributor

Description

Please include a summary of the change, e.g. what the new feature # is and/or what bug # it fixes. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes/Implements #(issue/feature)

  • Added avatar support using Gravatars
    image

  • Made space selector in the Shared Ask static

Collapsed

image

Expanded

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor and code improvement (non-breaking change which improves code quality and/or performance)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation
  • Tests
  • Other chores such as maintenance

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration by modifying the list below.

  • Test A
  • Test B
  • Test C

Test Configuration:

Please describe the test setup. List them below as bullet points.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • The commit message follows the convention of this project

osala-eng and others added 15 commits August 10, 2023 10:56
refactor:  Azure Blob data source - Switch data loader to our custom implementation based on OpenDAL

* docs: update AzureBlobs to match refactor
* Update `aiohttp` from 3.8.4 -> 3.8.5
* Change document file list to read from local json file (same as web scraper) rather than direct from Azure. Similar to web scraper
* refactor: move document list management methods to `SpaceDataSourceFileBased`
* add OpendalReader code + lic + copyright 

* refactor: DocumentListItem
  * change from `tuple` to a `dataclass`
  * move to domain.py
* chore: remove commented code
* test:
  * unit test DocumentListItem.create_instance
  * unit test consistency between document list save and load (serialise and de-serialise).
  * move test PDF doc folder
* Various minor fixes:
   * Always have some text for `page_title` metadata to render a link. Improve default behaviour to use <title> text if no H1. "web page" if no title text.
  * pass args to DocumentListItem() in the correct order
  * handle unknown source type in metadata. This should only happen if a breaking change to the type schema is made and data isn't migrated i.e. re-index.
  * style: fix style and lint errors 

BREAKING CHANGE: Azure Blob data source config scheme for credentials changes. SAS tokens are no longer supported only Account Key. Any Azure Blob data sources configured with a SAS token will stop working.
@osala-eng osala-eng requested a review from a team as a code owner August 12, 2023 06:36
@osala-eng osala-eng linked an issue Aug 12, 2023 that may be closed by this pull request
@osala-eng osala-eng marked this pull request as draft August 12, 2023 07:06
@osala-eng osala-eng marked this pull request as ready for review August 12, 2023 07:14
@janaka
Copy link
Contributor

janaka commented Aug 14, 2023

can you drop in screenshot of the full window so I can see what it looks like when a user is scrolled half up a long chat history

@osala-eng
Copy link
Contributor Author

osala-eng commented Aug 16, 2023

@janaka
The gravatar API only allows Image Requests using a calculated email hash. Not possible with just username.
https://en.gravatar.com/site/implement/images/

@janaka
Copy link
Contributor

janaka commented Aug 16, 2023

@osala-eng ok. Lets still use the username field. If it's an email address then try to display using Gravatar else use a default.

@osala-eng
Copy link
Contributor Author

@osala-eng ok. Lets still use the username field. If it's an email address then try to display using Gravatar else use a default.

Okay

source/docq/manage_users.py Outdated Show resolved Hide resolved
web/utils/handlers.py Fixed Show resolved Hide resolved
@janaka
Copy link
Contributor

janaka commented Aug 18, 2023

also can you bump llama index to the latest or if lots of breaking changes to something greater than v0.7.13

@osala-eng
Copy link
Contributor Author

also can you bump llama index to the latest or if lots of breaking changes to something greater than v0.7.13

Okay.

web/utils/handlers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@janaka janaka left a comment

Choose a reason for hiding this comment

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

@osala-eng left one comment about the function, once that's adjusted this should be good to go providing you have done sufficient testing.

@osala-eng osala-eng merged commit 81f96a8 into main Aug 22, 2023
3 checks passed
@osala-eng osala-eng deleted the enhancement/make-selector-sticky branch August 22, 2023 08:53
osala-eng added a commit that referenced this pull request Aug 22, 2023
* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Add custom styling for personal ask.

* chore: Remove unused imports.

* Refactor: azureblob datasource (#79)

refactor:  Azure Blob data source - Switch data loader to our custom implementation based on OpenDAL

* docs: update AzureBlobs to match refactor
* Update `aiohttp` from 3.8.4 -> 3.8.5
* Change document file list to read from local json file (same as web scraper) rather than direct from Azure. Similar to web scraper
* refactor: move document list management methods to `SpaceDataSourceFileBased`
* add OpendalReader code + lic + copyright 

* refactor: DocumentListItem
  * change from `tuple` to a `dataclass`
  * move to domain.py
* chore: remove commented code
* test:
  * unit test DocumentListItem.create_instance
  * unit test consistency between document list save and load (serialise and de-serialise).
  * move test PDF doc folder
* Various minor fixes:
   * Always have some text for `page_title` metadata to render a link. Improve default behaviour to use <title> text if no H1. "web page" if no title text.
  * pass args to DocumentListItem() in the correct order
  * handle unknown source type in metadata. This should only happen if a breaking change to the type schema is made and data isn't migrated i.e. re-index.
  * style: fix style and lint errors 

BREAKING CHANGE: Azure Blob data source config scheme for credentials changes. SAS tokens are no longer supported only Account Key. Any Azure Blob data sources configured with a SAS token will stop working.

* chore: Add avatar to chat messages

* chore: Added script to format avartars.

* feat: Make the space selector box stick to the top of the page.

* chore: Remove unused imports.

* Update user avatar settings.

* chore: Attach event listeners to space selector.

* chore: Cleanup imports.

* chore: Update chat_ui script.

* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Use username as email for gravatar requests.

* chore: Use identicon as avatar default

* chore: Set username in auth session state.

* chore: Cleanup imports.

* chore: Bump llama-index to 0.8.5.post2

* Update get username function

---------

Co-authored-by: Janaka Abeywardhana <[email protected]>
osala-eng added a commit that referenced this pull request Aug 25, 2023
* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Add custom styling for personal ask.

* chore: Remove unused imports.

* Refactor: azureblob datasource (#79)

refactor:  Azure Blob data source - Switch data loader to our custom implementation based on OpenDAL

* docs: update AzureBlobs to match refactor
* Update `aiohttp` from 3.8.4 -> 3.8.5
* Change document file list to read from local json file (same as web scraper) rather than direct from Azure. Similar to web scraper
* refactor: move document list management methods to `SpaceDataSourceFileBased`
* add OpendalReader code + lic + copyright

* refactor: DocumentListItem
  * change from `tuple` to a `dataclass`
  * move to domain.py
* chore: remove commented code
* test:
  * unit test DocumentListItem.create_instance
  * unit test consistency between document list save and load (serialise and de-serialise).
  * move test PDF doc folder
* Various minor fixes:
   * Always have some text for `page_title` metadata to render a link. Improve default behaviour to use <title> text if no H1. "web page" if no title text.
  * pass args to DocumentListItem() in the correct order
  * handle unknown source type in metadata. This should only happen if a breaking change to the type schema is made and data isn't migrated i.e. re-index.
  * style: fix style and lint errors

BREAKING CHANGE: Azure Blob data source config scheme for credentials changes. SAS tokens are no longer supported only Account Key. Any Azure Blob data sources configured with a SAS token will stop working.

* chore: Add avatar to chat messages

* chore: Added script to format avartars.

* feat: Make the space selector box stick to the top of the page.

* chore: Remove unused imports.

* Update user avatar settings.

* chore: Attach event listeners to space selector.

* chore: Cleanup imports.

* chore: Update chat_ui script.

* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Use username as email for gravatar requests.

* chore: Use identicon as avatar default

* chore: Set username in auth session state.

* chore: Cleanup imports.

* chore: Bump llama-index to 0.8.5.post2

* Update get username function

---------

Co-authored-by: Janaka Abeywardhana <[email protected]>
osala-eng added a commit that referenced this pull request Aug 25, 2023
* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Add custom styling for personal ask.

* chore: Remove unused imports.

* Refactor: azureblob datasource (#79)

refactor:  Azure Blob data source - Switch data loader to our custom implementation based on OpenDAL

* docs: update AzureBlobs to match refactor
* Update `aiohttp` from 3.8.4 -> 3.8.5
* Change document file list to read from local json file (same as web scraper) rather than direct from Azure. Similar to web scraper
* refactor: move document list management methods to `SpaceDataSourceFileBased`
* add OpendalReader code + lic + copyright

* refactor: DocumentListItem
  * change from `tuple` to a `dataclass`
  * move to domain.py
* chore: remove commented code
* test:
  * unit test DocumentListItem.create_instance
  * unit test consistency between document list save and load (serialise and de-serialise).
  * move test PDF doc folder
* Various minor fixes:
   * Always have some text for `page_title` metadata to render a link. Improve default behaviour to use <title> text if no H1. "web page" if no title text.
  * pass args to DocumentListItem() in the correct order
  * handle unknown source type in metadata. This should only happen if a breaking change to the type schema is made and data isn't migrated i.e. re-index.
  * style: fix style and lint errors

BREAKING CHANGE: Azure Blob data source config scheme for credentials changes. SAS tokens are no longer supported only Account Key. Any Azure Blob data sources configured with a SAS token will stop working.

* chore: Add avatar to chat messages

* chore: Added script to format avartars.

* feat: Make the space selector box stick to the top of the page.

* chore: Remove unused imports.

* Update user avatar settings.

* chore: Attach event listeners to space selector.

* chore: Cleanup imports.

* chore: Update chat_ui script.

* feat: Make the space selector box stick to the top of the page.

* chore: Cleanup files.

* chore: Use username as email for gravatar requests.

* chore: Use identicon as avatar default

* chore: Set username in auth session state.

* chore: Cleanup imports.

* chore: Bump llama-index to 0.8.5.post2

* Update get username function

---------

Co-authored-by: Janaka Abeywardhana <[email protected]>
osala-eng added a commit that referenced this pull request Sep 4, 2023
* chore: Re-arrange admin docs layout.

* chore: Update admin docs UI layout.

* chore: Rename consolidated space to Admin Spaces.

* Enhancement/make selector sticky (#84)

* feat: Make the space selector box stick to the top of the page.

* chore: Add custom styling for personal ask.

* chore: Remove unused imports.

* chore: Add an avatar to chat messages

* chore: Added script to format avatars.

* feat: Make the space selector box stick to the top of the page.

* chore: Remove unused imports.

* Update user avatar settings.

* chore: Attach event listeners to space selector.

* chore: Cleanup imports.

* chore: Update chat_ui script.

* feat: Make the space selector box stick to the top of the page.

* chore: Use username as email for gravatar requests.

* chore: Use identicon as avatar default

* chore: Set username in auth session state.

* chore: Bump llama-index to 0.8.5.post2

* Update get username function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants