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

"Created", "Updated" or "User" columns not available on RightSidebar #1625

Closed
peremp opened this issue Jun 27, 2017 · 10 comments
Closed

"Created", "Updated" or "User" columns not available on RightSidebar #1625

peremp opened this issue Jun 27, 2017 · 10 comments
Assignees

Comments

@peremp
Copy link

peremp commented Jun 27, 2017

Version Info

  • Directus version and branch: 6.4

Expected Behavior

When I have a Created, Updated or User column on a table, I should be able to see the column on the table view by selecting the option on the Right Sidebar.
This was possible on 6.3.9.

Actual Behavior

The columns does not appear.

Steps to Reproduce

  1. Create a table
  2. Add Created, Updated, and User column.
  3. Go to tables/TableName and click on the (i) Options button (top header)
@benhaynes benhaynes added this to the 6.4 (Ruby Rabbit) milestone Jun 29, 2017
@wellingguzman
Copy link

System columns are not longer hidden from the visible columns list anymore.

Although this will enforce the hidden_list and hidden_input attributes, if both are true the column will be hidden.

@peremp
Copy link
Author

peremp commented Jul 4, 2017

I think that the changes are not correct:

// TableViewRightPane.js line 164
.filter(function(model) {
     return !model.get('hidden_list') && !model.get('hidden_input');
})

Right now the column will be visible only if both (hidden_list and hidden_input) are 'false'.
I think that the correct filter should only take hidden_list into account:

// TableViewRightPane.js line 164
.filter(function(model) {
     return !model.get('hidden_list');
})

Anyway, in directus 6.4.0 you can't change the hidden_list value (or at least I can't find the option). Right now I'm changing this value directly on the DB.

@wellingguzman
Copy link

That's true, we have been dealing with these attributes since we started working on 6.4.x.

We only change hidden_input, we are thinking on removing hidden_list and use the columns_visible instead.

I'm glad you brought this up, let's see what @benhaynes and @rijkvanzanten has to say about this.

I'm on board but let's see if no one is planning on adding that button back.

@benhaynes
Copy link
Sponsor Member

A great point! The main question is how do we interact with this? Assuming it's global (and not per group as a permission) then it should be managed within Settings>Tables & Inputs.

We can add another icon column here to toggle the setting. But this will add visual noise and probably isn't a feature too many people will use. Also, what icon would we use to show this?

We could make the current visibility icon (eye) a four-way toggle similar to permissions. But this seems even messier.

We could remove the hidden_list option altogether, and have hidden_input be used for both.

We could leave it as is where it can only be edited in the database. But this doesn't help Hosted users who don't have direct DB access.

We could move this to the Permissions settings and have it managed by each group. But this is annoying if you want to change it globally – and adds visual noise to the permissions page.

What do you guys think is best?

@benhaynes benhaynes reopened this Jul 5, 2017
@peremp
Copy link
Author

peremp commented Jul 6, 2017

The only problem I see on removing the hidden_list and having hidden_input for both... i for M2M columns.
Because having a M2M column available in the filters makes no sense.

So, despite adding visual noise... I vote for adding another icon column.

@benhaynes
Copy link
Sponsor Member

OK, so I think we should remove hidden_list and use hidden_input for both.

I think that some M2M interfaces could be useful on the listing page: such as "relational tags" that show up. BUT, we need to add a way for the INTERFACE to force the columns not to be visible on listing.

So if you had an Interface that shouldn't be on listing (eg: a new M2M seating chart) then it can be disabled. This should/could ALSO be an Interface Option... so if the data isn't good for listing or the Admin user wants to turn it off, then it's done in the Interface Options globally.

Does this make sense? Can we all agree this is the simplest/best way?

@wellingguzman
Copy link

hidden_list removed and use hidden_input instead. Closed by 8edf1be

@wellingguzman
Copy link

@benhaynes should we force the M2M/O2M relationship to be hidden? I was thinking one possible way to use it, it is showing the count of related items.

@benhaynes
Copy link
Sponsor Member

No, we shouldn't hide it (unless the input is hidden). I think the best fallback/default is to show the count:

21 Items (general)
3 Files (if this is a file interface, or related table is directus_files)

We should be able to override this in the interface with a specific view though...

@wellingguzman
Copy link

We are displaying the count on O2M and M2M on listing page (d1b593f)

This last commit implement the last thing we discussed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants