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

Allow hiding columns in active tasks page #1426

Conversation

Antonio-Maranhao
Copy link
Contributor

Overview

Adds the ability for setting a list of hidden columns for the Active Tasks. It is not enabled by default as it is intended to be used by applications that extend Fauxton.

Testing recommendations

It's not enabled by default but you can modify one of the initialize() functions to set the hidden columns. Here's an example using the news addon:

News.initialize = function () {
  FauxtonAPI.addHeaderLink({
    id: 'News',
    title: 'News',
    icon: 'fonticon-clipboard',
    href: '#/news',
    bottomNav: true,
    top: true
  });
  // it hides the pid column
  FauxtonAPI.reduxDispatch({
    type: ActionTypes.ACTIVE_TASKS_SET_HIDDEN_COLUMNS,
    options: ['pid'],
  });
};

GitHub issue number

n/a

Related Pull Requests

n/a

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;
  • Update rebar.config.script with the correct tag once a new Fauxton release is made

@@ -34,7 +34,7 @@
width: 25%;
}

&.header-tarted-on {
&.header-started-on {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a fix - the typo was preventing the column from being correctly sized.

Comment on lines +40 to +41
const colSpan = 7 - this.props.hiddenColumns.length;
let msg = <td colSpan={colSpan}>No active {type} tasks.</td>;
Copy link
Contributor Author

@Antonio-Maranhao Antonio-Maranhao Jan 22, 2024

Choose a reason for hiding this comment

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

Also a fix. When the new node column was added, the colspan should had been incremented to 7.

@Antonio-Maranhao Antonio-Maranhao merged commit a9f6cdb into apache:main Jan 24, 2024
3 checks passed
@Antonio-Maranhao Antonio-Maranhao deleted the allow-hiding-active-tasks-columns branch January 24, 2024 13:23
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.

None yet

2 participants