Skip to content

Conversation

@jagabomb
Copy link
Contributor

@jagabomb jagabomb commented Nov 19, 2025

Adds some design improvements to the usability of the search for mobile layouts mostly. The search tool can be accessed by using the search icon button which then display the search field. The close/clear button (X) helps to close the search for now. There is also a minor font change for the desktop search field font size. EOS icons have also included as a CDN import so that we can update other icons in the future to make it more closer to the overall Trento design.

Existing Mobile Search:
Trento-Documentation-Trento-Documentation-11-19-2025_11_09_AM

Mobile Search with Search Icon Button:
Trento-Documentation-Trento-Documentation-11-19-2025_11_10_AM
Trento-Documentation-Trento-Documentation-11-19-2025_11_10_AM (1)

Proposed Behaviour between Search and Menu Panel States
Hardware-and-Software-Requirements-Brand-Docs

@jagabomb jagabomb self-assigned this Nov 19, 2025
@jagabomb jagabomb added the enhancement New feature or request label Nov 19, 2025
Copy link
Member

@EMaksy EMaksy left a comment

Choose a reason for hiding this comment

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

Hey @jagabomb thanks for the contribution, it looks good, just left a comment on the script.

{{/if}}
<script>
function toggleSearch() {
var searchField = document.getElementById('search-wrapper');
Copy link
Member

Choose a reason for hiding this comment

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

Try to use let or const instead of var overall ,as modern js recommends using let and const because they are block-scope

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let

Copy link
Member

Choose a reason for hiding this comment

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

Or we use es6 syntax?

const toggleSearch = () => {
    document.getElementById('search-wrapper')?.classList.toggle('hidden');
};

check out the ternary operator
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the lint command doesn't like the use of let for elements. Also I could not get the const toggleSearch = () => {..} to work. Anyway, I have reworked this to use 05-mobile-navbar.js file so that I could make the Menu close when the Search button is clicked and vice versa.

@jagabomb jagabomb force-pushed the mobile-search-improvement branch from 1ff145e to cbf6b10 Compare November 28, 2025 14:41
@jagabomb jagabomb requested a review from EMaksy November 28, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants