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

Optimize Footer Visibility in /history Routes #2598

Closed
wants to merge 1 commit into from

Conversation

Sn0w3y
Copy link
Contributor

@Sn0w3y Sn0w3y commented Mar 30, 2024

Summary

This PR addresses an issue with the footer overlaying content in the /history/*** tab, which detracts from the user experience by obscuring important information. To enhance usability and content visibility, we've implemented conditional logic to hide the footer on specific /history/*** routes that present detailed content.

Changes Made

The main change involves modifying the FooterComponent to dynamically adjust its visibility based on the current route. Here's an overview of the code adjustments:

import { Router, NavigationEnd } from '@angular/router';
// Additional imports remain unchanged

@Component({
  selector: 'oe-footer',
  // Styles and template remain unchanged
})
export class FooterComponent implements OnInit {
  showFooter: boolean = true; // Flag to control footer visibility

  constructor(
    // Constructor dependencies remain unchanged
    private router: Router, // Injected Router for route tracking
  ) {}

  ngOnInit() 
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
          this.showFooter = !this.router.url.includes('/history');
        });

    // The rest of the ngOnInit logic remains unchanged
  }
}

Justification:

Given the /history tab's purpose to display detailed historical data and analyses, ensuring that this content is fully visible and unobstructed is crucial for user engagement and effectiveness of data presentation. This change directly contributes to improving the overall user experience by making adjustments based on the application's context and user needs.

Copy link

Code Coverage

@sfeilmeier
Copy link
Contributor

@Sn0w3y: We do not intend to hide the Footer in History tab. If there are visualization problems (like overlapping content), they have to be fixed without removing the Footer.

@lukasrgr FYI

Maybe in future we should find a way to discuss these ideas before implementating them in a Pull-Request. Other open source projects require a Issue for every PR. Maybe we should require a post in a OpenEMS Community subforum before we accept PRs?

@sfeilmeier sfeilmeier closed this Mar 31, 2024
@Sn0w3y
Copy link
Contributor Author

Sn0w3y commented Mar 31, 2024

@Sn0w3y: We do not intend to hide the Footer in History tab. If there are visualization problems (like overlapping content), they have to be fixed without removing the Footer.

@lukasrgr FYI

Maybe in future we should find a way to discuss these ideas before implementating them in a Pull-Request. Other open source projects require a Issue for every PR. Maybe we should require a post in a OpenEMS Community subforum before we accept PRs?

Well Stefan i can understand but in the detailledHistoryChart it indeed overlaps:

image

@Sn0w3y
Copy link
Contributor Author

Sn0w3y commented Apr 4, 2024

fixed in #2594

@Sn0w3y Sn0w3y mentioned this pull request Apr 4, 2024
@Sn0w3y Sn0w3y deleted the fix/footer-history branch April 6, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants