You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/06 04:26:21 UTC

[GitHub] [kafka-site] showuon opened a new pull request #284: MINOR: Change the arrow direction based on the view state is expanded or not

showuon opened a new pull request #284:
URL: https://github.com/apache/kafka-site/pull/284


   Change the arrow direction based on the view state is expanded or not. We can identify it's in expanded mode or not by checking the return value of toggle method. Reference: https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/toggle
   
   ![image](https://user-images.githubusercontent.com/43372967/89490258-00d72500-d7df-11ea-8582-8bae5005a21e.png)
   
   
   
   ![image](https://user-images.githubusercontent.com/43372967/89490628-dcc81380-d7df-11ea-8335-8c4551253790.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka-site] guozhangwang merged pull request #284: MINOR: Change the arrow direction based on the view state is expanded or not

Posted by GitBox <gi...@apache.org>.
guozhangwang merged pull request #284:
URL: https://github.com/apache/kafka-site/pull/284


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka-site] showuon commented on pull request #284: MINOR: Change the arrow direction based on the view state is expanded or not

Posted by GitBox <gi...@apache.org>.
showuon commented on pull request #284:
URL: https://github.com/apache/kafka-site/pull/284#issuecomment-671740187


   @guozhangwang , I think this PR is good to merge except you have other opinions. Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka-site] showuon commented on pull request #284: MINOR: Change the arrow direction based on the view state is expanded or not

Posted by GitBox <gi...@apache.org>.
showuon commented on pull request #284:
URL: https://github.com/apache/kafka-site/pull/284#issuecomment-669677637


   @scott-confluent @guozhangwang , could you help review this PR? Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka-site] scott-confluent commented on a change in pull request #284: MINOR: Change the arrow direction based on the view state is expanded or not

Posted by GitBox <gi...@apache.org>.
scott-confluent commented on a change in pull request #284:
URL: https://github.com/apache/kafka-site/pull/284#discussion_r466554238



##########
File path: includes/_footer.htm
##########
@@ -329,7 +329,13 @@
 				var docsHandle = document.querySelector('.toc-handle');
 
 				function toggleDocsWidth() {
-					docsContainer.classList.toggle('expanded');
+					let isExpanded = docsContainer.classList.toggle('expanded');
+					// change the arrow direction based on the view state is expanded or not
+					if (isExpanded) {

Review comment:
       This is technically only working because JavaScript is lax on types and the `DOMTokenList` returned by  `classList.toggle` is empty resulting in a falsy value. We should probably do `isExapnded.contains('expanded')` as the condition to be more explicit.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org